struct

Candiru::FieldValue(T)

Inherits Candiru::IFieldValue < Struct < Value < Object

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

Constructors

new(field : TypedField(T), value : ValueInstance(T))
Source

Instance methods

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.

Source
clone
Source
copy_with(field _field = @field, value _value = @value)
Source
field
to_s(io)
Source
value
write(struct_pointer) : Pointer(T)

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

Source