class AMQ::Protocol::Table

Defined in:

amq/protocol/table.cr

Constant Summary

BYTEFORMAT = IO::ByteFormat::NetworkEndian

Constructors

Instance Method Summary

Constructor Detail

def self.from_bytes(bytes, format = BYTEFORMAT) : self #

[View source]
def self.from_io(io, format, size : UInt32 | Nil = nil) : self #

[View source]
def self.new(hash : Hash(String, Field) | NamedTuple) #

[View source]
def self.new(bytes : Bytes | Nil = Bytes.empty) #

[View source]

Instance Method Detail

def ==(other : self) #

Comparition on a semantic level, not on byte level


[View source]
def [](key : String) #

[View source]
def []=(key : String, value : Field) #

[View source]
def []?(key : String) #

[View source]
def all?(& : String, Field -> _) : Bool #

[View source]
def any?(& : String, Field -> _) : Bool #

[View source]
def bytesize #

[View source]
def clone #

[View source]
def delete(key : String) #

[View source]
def delete(key) #

DEPRECATED key must be String


[View source]
def each(& : String, Field -> _) #

[View source]
def each_key(& : String -> _) #

[View source]
def empty? #

[View source]
def fetch(key : String, default : Field) #

[View source]
def fetch(key : String, &) #

[View source]
def has_entry?(key : String, value : Field) : Bool #

Returns true if the table contains key and its value equals value. Semantically identical to has_key?(key) && self[key] == value but does not allocate for scalar and string values.


[View source]
def has_key?(key : String) : Bool #

[View source]
def has_key?(key) #

DEPRECATED key must be String


[View source]
def hash(hasher) #

See Object#hash(hasher)


[View source]
def inspect(io) #

[View source]
def merge!(other : Hash(String, Field) | NamedTuple | self) : self #

[View source]
def reject!(& : String, Field -> _) : self #

[View source]
def size #

[View source]
def to_h #

[View source]
def to_io(io, format) : Nil #

[View source]
def to_json(json : JSON::Builder) #

[View source]
def to_slice(pos = 0, length = @bytesize - pos) #

[View source]