struct Novika::FFI::InlineStructView

Overview

Value-side representation of an inline struct, aka stack-allocated struct. Allows to read and write fields (see StructView). Similar to the . operator in C.

Defined in:

novika/ffi.cr

Instance Method Summary

Instance methods inherited from struct Novika::FFI::StructView

==(other : StructView) ==, [](id : String) [], []=(id : String, value : ForeignValue) []=, []?(id : String) []?, address(*args, **options)
address(*args, **options, &)
address
, has_field?(*args, **options)
has_field?(*args, **options, &)
has_field?
, hash(hasher) hash, layout : StructLayout layout, size size, to_form? : Form | Nil to_form?, to_s(io) to_s, unsafe_fetch(index : Int) unsafe_fetch, unsafe_put(index : Int, value : ForeignValue) unsafe_put

Constructor methods inherited from struct Novika::FFI::StructView

new(layout : Novika::FFI::StructLayout, handle : Pointer(Void)) new

Instance methods inherited from module Novika::FFI::ForeignValue

box : Pointer(Void) box, must_be_of(type : ForeignType) must_be_of, to_form? : Form | Nil to_form?, write_to!(base : Pointer(Void)) : Pointer(Void) write_to!

Instance Method Detail

def box : Pointer(Void) #
Description copied from module Novika::FFI::ForeignValue

Wraps this value in a void pointer.


def to_s(io) #

def write_to!(base : Pointer(Void)) : Pointer(Void) #
Description copied from module Novika::FFI::ForeignValue

Writes this value starting at the given base pointer. Returns the base pointer.