pub struct MessageChunk {
    pub data: Vec<u8, Global>,
}
Expand description

A chunk holds a message or a portion of a message, if the message has been split into multiple chunks. The chunk’s data may be signed and encrypted. To extract the message requires all the chunks to be available in sequence so they can be formed back into the message.

Fields

data: Vec<u8, Global>

All of the chunk’s data including headers, payload, padding, signature

Implementations

Calculates the body size that fit inside of a message chunk of a particular size. This requires calculating the size of the header, the signature, padding etc. and deducting it to reveal the message size

Trait Implementations

Returns the exact byte length of the structure as it would be if encode were called. This may be called prior to writing to ensure the correct amount of space is available. Read more

Encodes the instance to the write stream.

Decodes an instance from the read stream. The decoding options contains restrictions set by the server / client on the length of strings, arrays etc. If these limits are exceeded the implementation should return with a BadDecodingError as soon as possible. Read more

Formats the value using the given formatter. Read more

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.