class
AMQ::Protocol::Table
- AMQ::Protocol::Table
- Reference
- Object
Defined in:
amq/protocol/table.crConstant Summary
-
BYTEFORMAT =
IO::ByteFormat::NetworkEndian
Constructors
- .from_bytes(bytes, format = BYTEFORMAT) : self
- .from_io(io, format, size : UInt32 | Nil = nil) : self
- .new(hash : Hash(String, Field) | NamedTuple)
- .new(bytes : Bytes | Nil = Bytes.empty)
Instance Method Summary
-
#==(other : self)
Comparition on a semantic level, not on byte level
- #[](key : String)
- #[]=(key : String, value : Field)
- #[]?(key : String)
- #all?(& : String, Field -> _) : Bool
- #any?(& : String, Field -> _) : Bool
- #bytesize
- #clone
- #delete(key : String)
-
#delete(key)
DEPRECATED key must be String
- #each(& : String, Field -> _)
- #each_key(& : String -> _)
- #empty?
- #fetch(key : String, default : Field)
- #fetch(key : String, &)
-
#has_entry?(key : String, value : Field) : Bool
Returns true if the table contains key and its value equals value.
- #has_key?(key : String) : Bool
-
#has_key?(key)
DEPRECATED key must be String
-
#hash(hasher)
See
Object#hash(hasher) - #inspect(io)
- #merge!(other : Hash(String, Field) | NamedTuple | self) : self
- #reject!(& : String, Field -> _) : self
- #size
- #to_h
- #to_io(io, format) : Nil
- #to_json(json : JSON::Builder)
- #to_slice(pos = 0, length = @bytesize - pos)
Constructor Detail
Instance Method Detail
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.