abstract struct Novika::FFI::StructType

Overview

Base type of the type side of structs.

Included Modules

Direct Known Subclasses

Defined in:

novika/ffi.cr

Constructors

Instance Method Summary

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

def self.new(layout : StructLayout) #

Instance Method Detail

def alignment(*args, **options) #

def alignment(*args, **options, &) #

def from?(form : StructViewForm) #

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.


def padded_size(*args, **options) #

def padded_size(*args, **options, &) #

def references?(*args, **options) #

def references?(*args, **options, &) #

def to_s(io) #

abstract def view_for(handle : Pointer(Void)) : StructView #

Returns the struct view corresponding to this struct type, wrapped around the given handle.