pub struct Writer { /* private fields */ }
Expand description

CBOR Data structure to write CBOR elements to a growing byte vector

Implementations

Create a new CBOR Writer

Finalize the CBOR writer and get the data as bytes

Append a Positive value in the writer

Append a Negative value in the writer

Append a Byte value in the writer

Append a Bytes value in the writer, depending of the Bytes CBOR encoding, it will be either represented as indefinite sequence of sequence bytes (terminated by CBOR break), or an immediate bytes sequence.

Append a Text value in the writer, depending of the Text CBOR encoding, it will be either represented as indefinite sequence of sequence utf8 bytes (terminated by CBOR break), or an immediate utf8 bytes sequence.

Append an Array in the writer using a closure

Append an Array in the writer

Append a Map in the writer using a closure

Append a Map in the writer

Append a Tagged value (TAG + CBOR value) in the writer

Append a Tagged value (TAG + CBOR value) in the writer

Append a constant value (false, true, null, undefined) in the writer

Append a boolean (as True/False) in the writer

Append a float (one of half, normal, double precision) in the writer

Append some CBOR data in the writer

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.