[−][src]Struct rustbus::message_builder::MarshalledMessageBody
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
impl MarshalledMessageBody
[src]
pub fn new() -> Self
[src]
New messagebody with the default little endian byteorder
pub fn with_byteorder(b: ByteOrder) -> Self
[src]
New messagebody with a chosen byteorder
pub fn from_parts(
buf: Vec<u8>,
raw_fds: Vec<UnixFd>,
sig: String,
byteorder: ByteOrder
) -> Self
[src]
buf: Vec<u8>,
raw_fds: Vec<UnixFd>,
sig: String,
byteorder: ByteOrder
) -> Self
pub fn reset(&mut self)
[src]
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.
pub fn push_old_param(&mut self, p: &Param<'_, '_>) -> Result<(), Error>
[src]
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.
pub fn push_old_params(&mut self, ps: &[Param<'_, '_>]) -> Result<(), Error>
[src]
Convenience function to call push_old_param on a slice of Param
pub fn push_param<P: Marshal>(&mut self, p: P) -> Result<(), Error>
[src]
Append something that is Marshal to the message body
pub fn push_param2<P1: Marshal, P2: Marshal>(
&mut self,
p1: P1,
p2: P2
) -> Result<(), Error>
[src]
&mut self,
p1: P1,
p2: P2
) -> Result<(), Error>
Append two things that are Marshal to the message body
pub fn push_param3<P1: Marshal, P2: Marshal, P3: Marshal>(
&mut self,
p1: P1,
p2: P2,
p3: P3
) -> Result<(), Error>
[src]
&mut self,
p1: P1,
p2: P2,
p3: P3
) -> Result<(), Error>
Append three things that are Marshal to the message body
pub fn push_param4<P1: Marshal, P2: Marshal, P3: Marshal, P4: Marshal>(
&mut self,
p1: P1,
p2: P2,
p3: P3,
p4: P4
) -> Result<(), Error>
[src]
&mut self,
p1: P1,
p2: P2,
p3: P3,
p4: P4
) -> Result<(), Error>
Append four things that are Marshal to the message body
pub fn push_param5<P1: Marshal, P2: Marshal, P3: Marshal, P4: Marshal, P5: Marshal>(
&mut self,
p1: P1,
p2: P2,
p3: P3,
p4: P4,
p5: P5
) -> Result<(), Error>
[src]
&mut self,
p1: P1,
p2: P2,
p3: P3,
p4: P4,
p5: P5
) -> Result<(), Error>
Append five things that are Marshal to the message body
pub fn push_params<P: Marshal>(&mut self, params: &[P]) -> Result<(), Error>
[src]
Append any number of things that have the same type that is Marshal to the message body
pub fn push_variant<P: Marshal>(&mut self, p: P) -> Result<(), Error>
[src]
Append something that is Marshal to the body but use a dbus Variant in the signature. This is necessary for some APIs
pub fn parser(&self) -> MessageBodyParser<'_>
[src]
Create a parser to retrieve parameters from the body.
Trait Implementations
impl Debug for MarshalledMessageBody
[src]
impl Default for MarshalledMessageBody
[src]
Auto Trait Implementations
impl RefUnwindSafe for MarshalledMessageBody
[src]
impl Send for MarshalledMessageBody
[src]
impl Sync for MarshalledMessageBody
[src]
impl Unpin for MarshalledMessageBody
[src]
impl UnwindSafe for MarshalledMessageBody
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,