Struct rustbus::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
Get a clone of all the UnixFd
s in the body.
Some of the UnixFd
s may already have their RawFd
s 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.
Push a Param with the old nested enum/struct approach. This is still supported for the case that in some corner cases the new trait/type based API does not work.
Convenience function to call push_old_param on a slice of Param
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 MarshalledMessageBody
impl Send for MarshalledMessageBody
impl Sync for MarshalledMessageBody
impl Unpin for MarshalledMessageBody
impl UnwindSafe for MarshalledMessageBody