class CBOR::Encoder
- CBOR::Encoder
- Reference
- Object
Defined in:
cbor/encoder.crConstructors
Instance Method Summary
- #object(&)
-
#to_s : String
Returns a nicely readable and concise string representation of this object, typically intended for users.
- #to_slice : Bytes
- #write(value : Nil | Nil.class, use_undefined : Bool = false)
- #write(value : Bool)
- #write(value : String)
- #write(value : Bytes)
- #write(value : Symbol)
- #write(value : Float32 | Float64)
- #write(value : Int8 | Int16 | Int32 | Int64)
-
#write(value : Int128)
The Int128 can't be bigger than an UInt64 if positive or when inverted
- #write(value : UInt8 | UInt16 | UInt32 | UInt64, offset : UInt8 = 0)
- #write(value : Hash)
- #write(value : Array)
- #write(value : Tuple)
- #write(value : SimpleValue)
- #write(tag : Tag)
- #write_array_start(size)
- #write_object_start(size)
Instance methods inherited from class Object
to_cbor(io : IO)to_cbor(encoder : CBOR::Encoder)
to_cbor : Bytes to_cbor
Class methods inherited from class Object
from_cbor(string_or_io)
from_cbor
Constructor Detail
Instance Method Detail
def to_s : String
#
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
.