struct MessagePack::Any
- MessagePack::Any
- Struct
- Value
- Object
Overview
A wrapper around a MessagePack object with convenience methods for type conversions
Defined in:
message_pack/any.crmessage_pack/to_msgpack.cr
Constructors
Macro Summary
Instance Method Summary
- #==(*args, **options)
- #==(*args, **options, &)
- #[](key : Symbol) : Any
- #[](key : Type) : Any
- #[]?(key : Type) : Any | Nil
-
#as_a : Array(MessagePack::Type)
Convert to Array(MessagePack::Type)
-
#as_a? : Array(MessagePack::Type) | Nil
Maybe convert to Array(MessagePack::Type)?
-
#as_bool : Bool
Convert to Bool
-
#as_bool? : Bool | Nil
Maybe convert to Bool?
-
#as_f : Float64
Convert to Float64
-
#as_f? : Float64 | Nil
Maybe convert to Float64?
-
#as_h : Hash(MessagePack::Type, MessagePack::Type)
Convert to Hash(MessagePack::Type, MessagePack::Type)
-
#as_h? : Hash(MessagePack::Type, MessagePack::Type) | Nil
Maybe convert to Hash(MessagePack::Type, MessagePack::Type)?
- #as_i
-
#as_i16 : Int16
Convert to Int16
-
#as_i16? : Int16 | Nil
Maybe convert to Int16?
-
#as_i32 : Int32
Convert to Int32
-
#as_i32? : Int32 | Nil
Maybe convert to Int32?
-
#as_i64 : Int64
Convert to Int64
-
#as_i64? : Int64 | Nil
Maybe convert to Int64?
-
#as_i8 : Int8
Convert to Int8
-
#as_i8? : Int8 | Nil
Maybe convert to Int8?
- #as_i?
-
#as_nil : Nil
Convert to Nil
-
#as_nil? : Nil | Nil
Maybe convert to Nil?
-
#as_s : String
Convert to String
-
#as_s? : String | Nil
Maybe convert to String?
- #as_u
-
#as_u16 : UInt16
Convert to UInt16
-
#as_u16? : UInt16 | Nil
Maybe convert to UInt16?
-
#as_u32 : UInt32
Convert to UInt32
-
#as_u32? : UInt32 | Nil
Maybe convert to UInt32?
-
#as_u64 : UInt64
Convert to UInt64
-
#as_u64? : UInt64 | Nil
Maybe convert to UInt64?
-
#as_u8 : UInt8
Convert to UInt8
-
#as_u8? : UInt8 | Nil
Maybe convert to UInt8?
- #as_u?
- #clone
- #dig(key : Type)
- #dig(key : Type, *subkeys)
- #dig?(key : Type, *subkeys)
-
#dup
Returns a shallow copy of this object.
- #each(&)
- #inspect(*args, **options)
- #inspect(*args, **options, &)
- #raw : Type
- #size
- #to_msgpack(packer : MessagePack::Packer)
- #to_s(*args, **options)
- #to_s(*args, **options, &)
Instance methods inherited from class Object
===(other : MessagePack::Any)
===,
to_msgpack(io : IO)to_msgpack(packer : MessagePack::Packer)
to_msgpack to_msgpack
Class methods inherited from class Object
from_msgpack(string_or_io, zero_copy = false)
from_msgpack
Constructor Detail
Macro Detail
Instance Method Detail
Maybe convert to Array(MessagePack::Type)?
Convert to Hash(MessagePack::Type, MessagePack::Type)
Maybe convert to Hash(MessagePack::Type, MessagePack::Type)?
Returns a shallow copy of this object.
Because Value
is a value type, this method returns self
,
which already involves a shallow copy of this object because
value types are passed by value.