module Novika::FFI::ForeignType
  
  Overview
Base type for Novika FFI types.
Direct including types
Defined in:
novika/ffi.crInstance Method Summary
- 
        #alloc : Pointer(Void)
        
          Allocates memory for this type. 
- 
        #from(form : Form) : ForeignValue
        
          Instantiates a foreign value of this foreign type from the given form. 
- 
        #from?(form : Form) : ForeignValue | Nil
        
          Instantiates a foreign value of this foreign type from the given form. 
- 
        #matches?(value : ForeignValue) : Bool
        
          Returns whether this type corresponds to the given value. 
- 
        #sizeof : UInt64
        
          Returns the size of this type, in bytes. 
- 
        #to_ffi_type : Crystal::FFI::Type
        
          Returns the corresponding LibFFI type. 
- 
        #unbox(box : Pointer(Void)) : ForeignValue
        
          Retrieves ForeignValueof this type from the given void pointer box.
Instance Method Detail
Allocates memory for this type. Returns a pointer to that memory.
Instantiates a foreign value of this foreign type from the given form.
Dies if conversion is impossible.
Instantiates a foreign value of this foreign type from the given form.
Returns nil if conversion is impossible.
Returns whether this type corresponds to the given value.
Retrieves ForeignValue of this type from the given void
pointer box.