[][src]Struct zbus::MessagePrimaryHeader

pub struct MessagePrimaryHeader { /* fields omitted */ }

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

impl MessagePrimaryHeader[src]

pub fn new(msg_type: MessageType, body_len: u32) -> Self[src]

Create a new MessagePrimaryHeader instance.

pub fn endian_sig(&self) -> EndianSig[src]

D-Bus code for bytorder encoding of the message.

pub fn set_endian_sig(&mut self, sig: EndianSig)[src]

Set the D-Bus code for bytorder encoding of the message.

pub fn msg_type(&self) -> MessageType[src]

The message type.

pub fn set_msg_type(&mut self, msg_type: MessageType)[src]

Set the message type.

pub fn flags(&self) -> BitFlags<MessageFlags>[src]

The message flags.

pub fn set_flags(&mut self, flags: BitFlags<MessageFlags>)[src]

Set the message flags.

pub fn protocol_version(&self) -> u8[src]

The major version of the protocol the message is compliant to.

Currently only 1 is valid.

pub fn set_protocol_version(&mut self, version: u8)[src]

Set the major version of the protocol the message is compliant to.

Currently only 1 is valid.

pub fn body_len(&self) -> u32[src]

The byte length of the message body.

pub fn set_body_len(&mut self, len: u32)[src]

Set the byte length of the message body.

pub fn serial_num(&self) -> u32[src]

The serial number of the message.

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

impl Debug for MessagePrimaryHeader[src]

impl<'de> Deserialize<'de> for MessagePrimaryHeader[src]

impl Serialize for MessagePrimaryHeader[src]

impl Type for MessagePrimaryHeader[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.