struct Candiru::FieldValue(T)

Overview

A TypedField(T) grouped with the appropriately typed value.

Included Modules

Defined in:

candiru.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(field : TypedField(T), value : ValueInstance(T)) #

[View source]

Instance Method Detail

def as_struct_instance? #

Converts the field value to a struct instance. Field value must be a valid pointer address (UInt64). Typed field must have a scaffolding attached.

Returns nil if any of those conditions are false.


[View source]
def clone #

[View source]
def copy_with(field _field = @field, value _value = @value) #

[View source]
def field : TypedField(T) #

def to_s(io) #

[View source]
def value : ValueInstance(T) #

def write(struct_pointer) : Pointer(T) #

Writes value at struct_pointer plus the required field offset, and returns the resulting pointer to value.


[View source]