class StructRef(T)

Overview

This class is used as a workaround for cases where we want to have a struct field that otherwise would break the rule that a struct cannot contain itself.

Basically, this lets us sort of pretend of have referential transparency by wrapping a struct in a class that forwards all methods to the struct.

Defined in:

savi/ext/struct_ref.cr

Constructors

Macro Summary

Instance Method Summary

Constructor Detail

def self.new(value : T) #

[View source]

Macro Detail

macro method_missing(call) #

[View source]

Instance Method Detail

def ==(other : StructRef(T)) #

[View source]
def ==(other_value : T) #

[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


[View source]
def inspect(io) #

[View source]
def pretty_print(pp) #

[View source]
def to_s(io) #

[View source]
def value : T #

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

[View source]