Struct async_rustbus::rustbus_core::message_builder::MarshalledMessage[][src]

pub struct MarshalledMessage {
    pub body: MarshalledMessageBody,
    pub dynheader: DynamicHeader,
    pub typ: MessageType,
    pub flags: u8,
}
Expand description

Message received by a connection or in preparation before being sent over a connection.

This represents a message while it is being built before it is sent over the connection. The body accepts everything that implements the Marshal trait (e.g. all basic types, strings, slices, Hashmaps,…..) And you can of course write an Marshal impl for your own datastructures. See the doc on the Marshal trait what you have to look out for when doing this though.

Fields

body: MarshalledMessageBodydynheader: DynamicHeadertyp: MessageTypeflags: u8

Implementations

New message with the default little endian byteorder

New messagebody with a chosen byteorder

Reserves space for additional bytes in the internal buffer. This is useful to reduce the amount of allocations done while marshalling, if you can predict somewhat accuratly how many bytes you will be marshalling.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. 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

Performs the conversion.

Performs the conversion.

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.