pub struct MessagePrimaryHeader { /* private fields */ }
Expand description
The primary message header, which is present in all D-Bus messages.
This header contains all the essential information about a message, regardless of its type.
Implementations§
Source§impl MessagePrimaryHeader
impl MessagePrimaryHeader
Sourcepub fn new(msg_type: MessageType, body_len: u32) -> Self
pub fn new(msg_type: MessageType, body_len: u32) -> Self
Create a new MessagePrimaryHeader
instance.
Sourcepub fn endian_sig(&self) -> EndianSig
pub fn endian_sig(&self) -> EndianSig
D-Bus code for bytorder encoding of the message.
Sourcepub fn set_endian_sig(&mut self, sig: EndianSig)
pub fn set_endian_sig(&mut self, sig: EndianSig)
Set the D-Bus code for bytorder encoding of the message.
Sourcepub fn msg_type(&self) -> MessageType
pub fn msg_type(&self) -> MessageType
The message type.
Sourcepub fn set_msg_type(&mut self, msg_type: MessageType)
pub fn set_msg_type(&mut self, msg_type: MessageType)
Set the message type.
Sourcepub fn flags(&self) -> BitFlags<MessageFlags>
pub fn flags(&self) -> BitFlags<MessageFlags>
The message flags.
Sourcepub fn set_flags(&mut self, flags: BitFlags<MessageFlags>)
pub fn set_flags(&mut self, flags: BitFlags<MessageFlags>)
Set the message flags.
Sourcepub fn protocol_version(&self) -> u8
pub fn protocol_version(&self) -> u8
The major version of the protocol the message is compliant to.
Currently only 1
is valid.
Sourcepub fn set_protocol_version(&mut self, version: u8)
pub fn set_protocol_version(&mut self, version: u8)
Set the major version of the protocol the message is compliant to.
Currently only 1
is valid.
Sourcepub fn set_body_len(&mut self, len: u32)
pub fn set_body_len(&mut self, len: u32)
Set the byte length of the message body.
Sourcepub fn serial_num(&self) -> Option<&u32>
pub fn serial_num(&self) -> Option<&u32>
The serial number of the message (if set).
This is used to match a reply to a method call.
Note: There is no setter provided for this in the public API since this is set by the
Connection
the message is sent over.
Trait Implementations§
Source§impl Clone for MessagePrimaryHeader
impl Clone for MessagePrimaryHeader
Source§fn clone(&self) -> MessagePrimaryHeader
fn clone(&self) -> MessagePrimaryHeader
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more