struct MessagePack::Packer

Defined in:

message_pack/packer.cr

Constructors

Instance Method Summary

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

def self.new(io : IO = IO::Memory.new, &) #

[View source]
def self.new(io : IO = IO::Memory.new) #

[View source]

Instance Method Detail

def bytes #

[View source]
def to_s #
Description copied from class Object

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.


[View source]
def to_slice #

[View source]
def write(value : Nil) #

[View source]
def write(value : Bool) #

[View source]
def write(value : String) #

[View source]
def write(value : Bytes) #

[View source]
def write(value : Symbol) #

[View source]
def write(value : Float32 | Float64) #

[View source]
def write(value : Int8 | Int16 | Int32 | Int64 | UInt8 | UInt16 | UInt32 | UInt64) #

[View source]
def write(value : Hash) #

[View source]
def write(value : Array) #

[View source]
def write(value : Tuple) #

[View source]
def write_array_start(length) #

[View source]
def write_binary_start(bytesize) #

[View source]
def write_ext(type_id : Int8, bytes : Bytes) #

[View source]
def write_ext(type_id : Int8, &) #

[View source]
def write_ext_start(bytesize) #

[View source]
def write_hash_start(length) #

[View source]
def write_string_start(bytesize) #

[View source]