Class: MilkTea::Types::Subscription

Inherits:
Base
  • Object
show all
Defined in:
lib/milk_tea/core/types/types.rb

Instance Method Summary collapse

Methods inherited from Base

#accept, #bitwise?, #boolean?, #children, #field_c_name, #float?, #integer?, #numeric?, #sendable?, #void?

Instance Method Details

#eql?(other) ⇒ Boolean Also known as: ==

Returns:

  • (Boolean)


693
694
695
# File 'lib/milk_tea/core/types/types.rb', line 693

def eql?(other)
  other.is_a?(Subscription)
end

#field(name) ⇒ Object



667
668
669
670
671
672
# File 'lib/milk_tea/core/types/types.rb', line 667

def field(name)
  {
    "slot" => Primitive.new("ptr_uint"),
    "generation" => Primitive.new("ptr_uint"),
  }.fetch(name)
end

#fieldsObject



674
675
676
677
678
679
# File 'lib/milk_tea/core/types/types.rb', line 674

def fields
  {
    "slot" => Primitive.new("ptr_uint"),
    "generation" => Primitive.new("ptr_uint"),
  }.freeze
end

#hashObject



699
700
701
# File 'lib/milk_tea/core/types/types.rb', line 699

def hash
  self.class.hash
end

#linkage_nameObject



689
690
691
# File 'lib/milk_tea/core/types/types.rb', line 689

def linkage_name
  "mt_subscription"
end

#module_nameObject



685
686
687
# File 'lib/milk_tea/core/types/types.rb', line 685

def module_name
  nil
end

#nameObject



681
682
683
# File 'lib/milk_tea/core/types/types.rb', line 681

def name
  "Subscription"
end

#to_sObject



704
705
706
# File 'lib/milk_tea/core/types/types.rb', line 704

def to_s
  "Subscription"
end