pub struct MessageHeader<'m> { /* private fields */ }
Expand description
The message header, containing all the metadata about the message.
This includes both the MessagePrimaryHeader
and MessageFields
.
Implementations§
source§impl<'m> MessageHeader<'m>
impl<'m> MessageHeader<'m>
sourcepub fn new(primary: MessagePrimaryHeader, fields: MessageFields<'m>) -> Self
pub fn new(primary: MessagePrimaryHeader, fields: MessageFields<'m>) -> Self
Create a new MessageHeader
instance.
sourcepub fn primary(&self) -> &MessagePrimaryHeader
pub fn primary(&self) -> &MessagePrimaryHeader
Get a reference to the primary header.
sourcepub fn primary_mut(&mut self) -> &mut MessagePrimaryHeader
pub fn primary_mut(&mut self) -> &mut MessagePrimaryHeader
Get a mutable reference to the primary header.
sourcepub fn into_primary(self) -> MessagePrimaryHeader
pub fn into_primary(self) -> MessagePrimaryHeader
Get the primary header, consuming self
.
sourcepub fn fields<'s>(&'s self) -> &'s MessageFields<'m>
pub fn fields<'s>(&'s self) -> &'s MessageFields<'m>
Get a reference to the message fields.
sourcepub fn fields_mut<'s>(&'s mut self) -> &'s mut MessageFields<'m>
pub fn fields_mut<'s>(&'s mut self) -> &'s mut MessageFields<'m>
Get a mutable reference to the message fields.
sourcepub fn into_fields(self) -> MessageFields<'m>
pub fn into_fields(self) -> MessageFields<'m>
Get the message fields, consuming self
.
sourcepub fn message_type(&self) -> Result<MessageType, Error>
pub fn message_type(&self) -> Result<MessageType, Error>
The message type
sourcepub fn path<'s>(&'s self) -> Result<Option<&ObjectPath<'m>>, Error>
pub fn path<'s>(&'s self) -> Result<Option<&ObjectPath<'m>>, Error>
The object to send a call to, or the object a signal is emitted from.
sourcepub fn interface<'s>(&'s self) -> Result<Option<&InterfaceName<'m>>, Error>
pub fn interface<'s>(&'s self) -> Result<Option<&InterfaceName<'m>>, Error>
The interface to invoke a method call on, or that a signal is emitted from.
sourcepub fn member<'s>(&'s self) -> Result<Option<&MemberName<'m>>, Error>
pub fn member<'s>(&'s self) -> Result<Option<&MemberName<'m>>, Error>
The member, either the method name or signal name.
sourcepub fn error_name<'s>(&'s self) -> Result<Option<&ErrorName<'m>>, Error>
pub fn error_name<'s>(&'s self) -> Result<Option<&ErrorName<'m>>, Error>
The name of the error that occurred, for errors.
sourcepub fn reply_serial(&self) -> Result<Option<u32>, Error>
pub fn reply_serial(&self) -> Result<Option<u32>, Error>
The serial number of the message this message is a reply to.
sourcepub fn destination<'s>(&'s self) -> Result<Option<&BusName<'m>>, Error>
pub fn destination<'s>(&'s self) -> Result<Option<&BusName<'m>>, Error>
The name of the connection this message is intended for.
sourcepub fn sender<'s>(&'s self) -> Result<Option<&UniqueName<'m>>, Error>
pub fn sender<'s>(&'s self) -> Result<Option<&UniqueName<'m>>, Error>
Unique name of the sending connection.
Trait Implementations§
source§impl<'m> Clone for MessageHeader<'m>
impl<'m> Clone for MessageHeader<'m>
source§fn clone(&self) -> MessageHeader<'m>
fn clone(&self) -> MessageHeader<'m>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<'m> Debug for MessageHeader<'m>
impl<'m> Debug for MessageHeader<'m>
source§impl<'de: 'm, 'm> Deserialize<'de> for MessageHeader<'m>
impl<'de: 'm, 'm> Deserialize<'de> for MessageHeader<'m>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl<'m> From<MessageHeader<'m>> for MessageBuilder<'m>
impl<'m> From<MessageHeader<'m>> for MessageBuilder<'m>
source§fn from(header: MessageHeader<'m>) -> Self
fn from(header: MessageHeader<'m>) -> Self
source§impl<'m> Serialize for MessageHeader<'m>
impl<'m> Serialize for MessageHeader<'m>
Auto Trait Implementations§
impl<'m> !Freeze for MessageHeader<'m>
impl<'m> RefUnwindSafe for MessageHeader<'m>
impl<'m> Send for MessageHeader<'m>
impl<'m> Sync for MessageHeader<'m>
impl<'m> Unpin for MessageHeader<'m>
impl<'m> UnwindSafe for MessageHeader<'m>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)