struct Novika::FFI::I16

Overview

Type-side and value-side representation of Int16.

Included Modules

Extended Modules

Defined in:

novika/ffi.cr

Constructors

Class Method Summary

Instance Method Summary

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!

Constructor Detail

def self.new(decimal) #

[View source]

Class Method Detail

def self.alloc : Pointer(Void) #

[View source]
def self.from?(form : Decimal) #

[View source]
def self.matches?(value : I16) : Bool #

[View source]
def self.to_ffi_type : Crystal::FFI::Type #

[View source]
def self.to_s(io) #

[View source]
def self.unbox(box : Pointer(Void)) : ForeignValue #

[View source]

Instance Method Detail

def ==(other : self) #

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

Wraps this value in a void pointer.


[View source]
def hash(hasher) #
Description copied from struct Struct

See Object#hash(hasher)


def to_crystal : Int16 #

[View source]
def to_form? : Form | Nil #
Description copied from module Novika::FFI::ForeignValue

Determines the best form type to represent this foreign value, then builds and returns a form of that type.

Returns nil if value is nothing.


[View source]
def to_s(io) #

[View source]
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.


[View source]