struct

MessagePack::Packer

Inherits Struct / Value / Object

Constructors

new(io : IO = IO::Memory.new, &)
Source
new(io : IO = IO::Memory.new)
Source

Instance methods

bytes
Source
to_s

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.

Source
to_slice
Source
write(value : Nil)
Source
write(value : Bool)
Source
write(value : String)
Source
write(value : Bytes)
Source
write(value : Symbol)
Source
write(value : Float32 | Float64)
Source
write(value : Int8 | Int16 | Int32 | Int64 | UInt8 | UInt16 | UInt32 | UInt64)
Source
write(value : Hash)
Source
write(value : Array)
Source
write(value : Tuple)
Source
write_array_start(length)
Source
write_binary_start(bytesize)
Source
write_ext(type_id : Int8, bytes : Bytes)
Source
write_ext(type_id : Int8, &)
Source
write_ext_start(bytesize)
Source
write_hash_start(length)
Source
write_string_start(bytesize)
Source