struct Novika::FFI::InlineStructType
  
  - Novika::FFI::InlineStructType
- Novika::FFI::StructType
- Struct
- Value
- Object
Overview
Type-side representation of an inline struct, e.g. one returned
from a function or passed as an argument, aka stack-allocated
structs (like Crystal struct).
Defined in:
novika/ffi.crInstance Method Summary
- 
        #alloc : Pointer(Void)
        
          Allocates memory for this type. 
- #matches?(view : InlineStructView) : Bool
- 
        #sizeof : UInt64
        
          Returns the size of this type, in bytes. 
- 
        #to_ffi_type : Crystal::FFI::Type
        
          Returns the corresponding LibFFI type. 
- #to_s(io)
- 
        #unbox(box : Pointer(Void)) : ForeignValue
        
          Retrieves ForeignValueof this type from the given void pointer box.
- 
        #view_for(handle : Pointer(Void)) : StructView
        
          Returns the struct view corresponding to this struct type, wrapped around the given handle. 
Instance methods inherited from struct Novika::FFI::StructType
  
  
    
      alignment(*args, **options)alignment(*args, **options, &) alignment, from?(form : StructViewForm) from?, make! : StructView make!, padded_size(*args, **options)
padded_size(*args, **options, &) padded_size, references?(*args, **options)
references?(*args, **options, &) references?, to_s(io) to_s, view_for(handle : Pointer(Void)) : StructView view_for
Constructor methods inherited from struct Novika::FFI::StructType
  
  
    
      new(layout : StructLayout)
    new
    
  
    
  
    
  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
    
  
    
    
  
    
    
    
  
    
    
    
  
    
    
    
  
Instance Method Detail
        
        def alloc : Pointer(Void)
        #
      
      
        
              Description copied from module Novika::FFI::ForeignType
            
          
          Allocates memory for this type. Returns a pointer to that memory.
        
        def sizeof : UInt64
        #
      
      
        
              Description copied from module Novika::FFI::ForeignType
            
          
          Returns the size of this type, in bytes.
        
        def to_ffi_type : Crystal::FFI::Type
        #
      
      
        
              Description copied from module Novika::FFI::ForeignType
            
          
          Returns the corresponding LibFFI type.
        
        def unbox(box : Pointer(Void)) : ForeignValue
        #
      
      
        
              Description copied from module Novika::FFI::ForeignType
            
          
          Retrieves ForeignValue of this type from the given void
pointer box.
        
        def view_for(handle : Pointer(Void)) : StructView
        #
      
      
        
              Description copied from struct Novika::FFI::StructType
            
          
          Returns the struct view corresponding to this struct type, wrapped around the given handle.