Struct async_rustbus::rustbus_core::message_builder::MarshalledMessageBody [−][src]
pub struct MarshalledMessageBody { /* fields omitted */ }Expand description
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 datastrcutures
Implementations
New messagebody with a chosen byteorder
pub fn from_parts(
buf: Vec<u8>,
raw_fds: Vec<UnixFd>,
sig: SignatureBuffer,
byteorder: ByteOrder
) -> SelfGet a clone of all the UnixFds in the body.
Some of the UnixFds may already have their RawFds taken.
Clears the buffer and signature but holds on to the memory allocations. You can now start pushing new params as if this were a new message. This allows to reuse the OutMessage for the same dbus-message with different parameters without allocating the buffer every time.
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.
Append something that is Marshal to the message body
Append two things that are Marshal to the message body
Append three things that are Marshal to the message body
Append four things that are Marshal to the message body
Append five things that are Marshal to the message body
Append any number of things that have the same type that is Marshal to the message body
Append something that is Marshal to the body but use a dbus Variant in the signature. This is necessary for some APIs
Validate the all the marshalled elements of the body.
Create a parser to retrieve parameters from the body.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for MarshalledMessageBodyimpl Send for MarshalledMessageBodyimpl Sync for MarshalledMessageBodyimpl Unpin for MarshalledMessageBodyimpl UnwindSafe for MarshalledMessageBody