Class: RabbitMQ::FFI::ConnectionStart Private

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/rabbitmq/ffi/gen/connection_start.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.idObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
# File 'lib/rabbitmq/ffi/gen/connection_start.rb', line 13

def self.id
  :connection_start
end

Instance Method Details

#apply(version_major: nil, version_minor: nil, server_properties: nil, mechanisms: nil, locales: nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



21
22
23
24
25
26
27
28
# File 'lib/rabbitmq/ffi/gen/connection_start.rb', line 21

def apply(version_major: nil, version_minor: nil, server_properties: nil, mechanisms: nil, locales: nil)
  self[:version_major] = Integer(version_major) if version_major
  self[:version_minor] = Integer(version_minor) if version_minor
  self[:server_properties] = Table.from(server_properties) if server_properties
  self[:mechanisms] = Bytes.from_s(mechanisms.to_s) if mechanisms
  self[:locales] = Bytes.from_s(locales.to_s) if locales
  self
end

#free!Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



40
41
42
43
44
# File 'lib/rabbitmq/ffi/gen/connection_start.rb', line 40

def free!
  self[:server_properties].free!
  self[:mechanisms].free!
  self[:locales].free!
end

#idObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



17
18
19
# File 'lib/rabbitmq/ffi/gen/connection_start.rb', line 17

def id
  :connection_start
end

#to_h(free = false) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



30
31
32
33
34
35
36
37
38
# File 'lib/rabbitmq/ffi/gen/connection_start.rb', line 30

def to_h(free=false)
  {
    version_major: self[:version_major],
    version_minor: self[:version_minor],
    server_properties: self[:server_properties].to_h(free),
    mechanisms: self[:mechanisms].to_s(free),
    locales: self[:locales].to_s(free)
  }
end