struct Candiru::FieldValue(T)
- Candiru::FieldValue(T)
- Struct
- Value
- Object
Overview
A TypedField(T)
grouped with the appropriately typed value.
Included Modules
Defined in:
candiru.crConstructors
Instance Method Summary
-
#as_struct_instance?
Converts the field value to a struct instance.
- #clone
- #copy_with(field _field = @field, value _value = @value)
- #field : TypedField(T)
- #to_s(io)
- #value : ValueInstance(T)
-
#write(struct_pointer) : Pointer(T)
Writes value at struct_pointer plus the required field offset, and returns the resulting pointer to value.
Constructor Detail
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.
def write(struct_pointer) : Pointer(T)
#
Writes value at struct_pointer plus the required field offset, and returns the resulting pointer to value.