struct Candiru::StructBuilder

Overview

Helps to construct and allocate a StructInstance based on its StructScaffolding.

Makes sure the amount of struct fields is right, their type is right, etc.

Defined in:

candiru.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(scaffolding : StructScaffolding) #

[View source]

Instance Method Detail

def <<(value : StructInstance) #

Appends a field with pointer to value.


[View source]
def <<(value : T) forall T #

Appends a field with value.


[View source]
def malloc #

Allocates memory for an instance, writes field values there, and returns the resulting StructInstance.


[View source]