pub struct Message {
pub big_endian: bool,
pub message_type: MessageType,
pub flags: u8,
pub version: u8,
pub serial: u32,
pub headers: Vec<HeaderField>,
pub body: Vec<u8>,
/* private fields */
}Expand description
Represents a received message from the message bus
Fields§
§big_endian: bool§message_type: MessageType§flags: u8§version: u8§serial: u32§headers: Vec<HeaderField>§body: Vec<u8>Implementations§
Source§impl Message
impl Message
Sourcepub fn add_arg(self, arg: &dyn Marshal) -> Message
pub fn add_arg(self, arg: &dyn Marshal) -> Message
Add the given argument to the Message. Accepts anything that implements the Marshal trait, which is most basic types, as well as the general-purpose dbus_serialize::types::Value enum.
Note that these calls can be chained together to add multiple arguments, see the example
§Examples
dbus_bytestream::message::create_method_call("foo", "/bar", "baz", "bloop")
.add_arg(&1)
.add_arg(&"string");pub fn get_header(&self, name: u8) -> Option<&Variant>
pub fn get_header_mut(&mut self, name: u8) -> Option<&mut Variant>
pub fn add_header(self, name: u8, val: Variant) -> Message
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Message
impl !RefUnwindSafe for Message
impl Send for Message
impl !Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more