abstract struct Novika::FFI::StructType
- Novika::FFI::StructType
- Struct
- Value
- Object
Overview
Base type of the type side of structs.
Included Modules
Direct Known Subclasses
Defined in:
novika/ffi.crConstructors
Instance Method Summary
-
#alignment(*args, **options)
See
StructLayout
. -
#alignment(*args, **options, &)
See
StructLayout
. - #from?(form : StructViewForm)
-
#make! : StructView
Constructs a struct view for this struct type.
-
#padded_size(*args, **options)
See
StructLayout
. -
#padded_size(*args, **options, &)
See
StructLayout
. -
#references?(*args, **options)
See
StructLayout
. -
#references?(*args, **options, &)
See
StructLayout
. - #to_s(io)
-
#view_for(handle : Pointer(Void)) : StructView
Returns the struct view corresponding to this struct type, wrapped around the given handle.
Instance methods inherited from module Novika::FFI::ForeignType
alloc : Pointer(Void)
alloc,
from(form : Form) : ForeignValue
from,
from?(form : Form) : ForeignValue | Nil
from?,
matches?(value : ForeignValue) : Bool
matches?,
sizeof : UInt64
sizeof,
to_ffi_type : Crystal::FFI::Type
to_ffi_type,
unbox(box : Pointer(Void)) : ForeignValue
unbox
Constructor Detail
Instance Method Detail
def make! : StructView
#
Constructs a struct view for this struct type.
This method is unsafe: the resulting struct view's content is unmoderated. You'll need to fill all fields with values before the struct view could be considered well-defined.
abstract
def view_for(handle : Pointer(Void)) : StructView
#
Returns the struct view corresponding to this struct type, wrapped around the given handle.