pub struct PrimaryHeader { /* 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 PrimaryHeader
impl PrimaryHeader
Sourcepub fn endian_sig(&self) -> EndianSig
pub fn endian_sig(&self) -> EndianSig
D-Bus code for endian 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 endian encoding of the message.
Sourcepub fn set_msg_type(&mut self, msg_type: Type)
pub fn set_msg_type(&mut self, msg_type: Type)
Set the message type.
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) -> NonZeroU32
pub fn serial_num(&self) -> NonZeroU32
The serial number of the message.
This is used to match a reply to a method call.
Sourcepub fn set_serial_num(&mut self, serial_num: NonZeroU32)
pub fn set_serial_num(&mut self, serial_num: NonZeroU32)
Set the serial number of the message.
This is used to match a reply to a method call.
Trait Implementations§
Source§impl Clone for PrimaryHeader
impl Clone for PrimaryHeader
Source§fn clone(&self) -> PrimaryHeader
fn clone(&self) -> PrimaryHeader
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PrimaryHeader
impl Debug for PrimaryHeader
Source§impl<'de> Deserialize<'de> for PrimaryHeader
impl<'de> Deserialize<'de> for PrimaryHeader
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for PrimaryHeader
impl Serialize for PrimaryHeader
Auto Trait Implementations§
impl Freeze for PrimaryHeader
impl RefUnwindSafe for PrimaryHeader
impl Send for PrimaryHeader
impl Sync for PrimaryHeader
impl Unpin for PrimaryHeader
impl UnwindSafe for PrimaryHeader
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, T> DynamicDeserialize<'de> for T
impl<'de, T> DynamicDeserialize<'de> for T
Source§type Deserializer = PhantomData<T>
type Deserializer = PhantomData<T>
A DeserializeSeed implementation for this type.
Source§fn deserializer_for_signature<S>(
signature: S,
) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>
fn deserializer_for_signature<S>( signature: S, ) -> Result<<T as DynamicDeserialize<'de>>::Deserializer, Error>
Get a deserializer compatible with this signature.
Source§impl<T> DynamicType for T
impl<T> DynamicType for T
Source§fn dynamic_signature(&self) -> Signature<'_>
fn dynamic_signature(&self) -> Signature<'_>
Get the signature for the implementing type. Read more