module Candiru::ValueClass(T)

Overview

Should be extended by objects that want to be Crystal- facing FFI description objects (e.g. Int32, Float64).

Included Modules

Direct including types

Defined in:

candiru.cr

Instance Method Summary

Instance methods inherited from module Candiru::IValueClassType

adopt_as_field_value(field : ITypedField, pointer : Pointer(Void)) adopt_as_field_value, from_ffi_return_pointer(pointer : Pointer(Void)) from_ffi_return_pointer, matches?(other) matches?, to_ffi : FFI::Type to_ffi

Instance Method Detail

def adopt_as_field_value(field : ITypedField, pointer : Pointer(Void)) : FieldValue(T) #
Description copied from module Candiru::IValueClassType

Performs the necessary type sorcery to create a FieldValue(T) from a void pointer and the corresponding typed field.


[View source]
def from_ffi_return_pointer(pointer : Pointer(Void)) #
Description copied from module Candiru::IValueClassType

Casts pointer, a return value hole from FFI, to this type, and returns its value.


[View source]
def matches?(other : T) #

[View source]