Class: Melos::Struct::SenderData

Inherits:
Base
  • Object
show all
Defined in:
lib/melos/struct/structs.rb

Overview

6.3.2

Constant Summary collapse

STRUCT =
[
  [:leaf_index, :uint32],
  [:generation, :uint32],
  [:reuse_guard, :opaque, 4]
]

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Base

#deserialize_select_elem_with_context, #initialize, #raw

Constructor Details

This class inherits a constructor from Melos::Struct::Base

Instance Attribute Details

#generationObject (readonly)

Returns the value of attribute generation.



41
42
43
# File 'lib/melos/struct/structs.rb', line 41

def generation
  @generation
end

#leaf_indexObject (readonly)

Returns the value of attribute leaf_index.



41
42
43
# File 'lib/melos/struct/structs.rb', line 41

def leaf_index
  @leaf_index
end

#reuse_guardObject (readonly)

Returns the value of attribute reuse_guard.



41
42
43
# File 'lib/melos/struct/structs.rb', line 41

def reuse_guard
  @reuse_guard
end

Class Method Details

.create(leaf_index:, generation:, reuse_guard:) ⇒ Object



48
49
50
51
52
53
54
# File 'lib/melos/struct/structs.rb', line 48

def self.create(leaf_index:, generation:, reuse_guard:)
  new_instance = self.allocate
  new_instance.instance_variable_set(:@leaf_index, leaf_index)
  new_instance.instance_variable_set(:@generation, generation)
  new_instance.instance_variable_set(:@reuse_guard, reuse_guard)
  new_instance
end