ProtocolMessageHeader

Struct ProtocolMessageHeader 

Source
pub struct ProtocolMessageHeader {
    pub exchange_flags: u8,
    pub opcode: u8,
    pub exchange_id: u16,
    pub protocol_id: u16,
    pub ack_counter: u32,
}

Fields§

§exchange_flags: u8§opcode: u8§exchange_id: u16§protocol_id: u16§ack_counter: u32

Implementations§

Source§

impl ProtocolMessageHeader

Source

pub const FLAG_INITIATOR: u8 = 1

Source

pub const FLAG_ACK: u8 = 2

Source

pub const FLAG_RELIABILITY: u8 = 4

Source

pub const OPCODE_ACK: u8 = 0x10

Source

pub const OPCODE_PBKDF_REQ: u8 = 0x20

Source

pub const OPCODE_PBKDF_RESP: u8 = 0x21

Source

pub const OPCODE_PASE_PAKE1: u8 = 0x22

Source

pub const OPCODE_PASE_PAKE2: u8 = 0x23

Source

pub const OPCODE_PASE_PAKE3: u8 = 0x24

Source

pub const OPCODE_CASE_SIGMA1: u8 = 0x30

Source

pub const OPCODE_CASE_SIGMA2: u8 = 0x31

Source

pub const OPCODE_CASE_SIGMA3: u8 = 0x32

Source

pub const OPCODE_STATUS: u8 = 0x40

Source

pub const INTERACTION_OPCODE_STATUS_RESP: u8 = 0x1

Source

pub const INTERACTION_OPCODE_READ_REQ: u8 = 0x2

Source

pub const INTERACTION_OPCODE_SUBSCRIBE_REQ: u8 = 0x3

Source

pub const INTERACTION_OPCODE_SUBSCRIBE_RESP: u8 = 0x4

Source

pub const INTERACTION_OPCODE_REPORT_DATA: u8 = 0x5

Source

pub const INTERACTION_OPCODE_WRITE_REQ: u8 = 0x6

Source

pub const INTERACTION_OPCODE_WRITE_RESP: u8 = 0x7

Source

pub const INTERACTION_OPCODE_INVOKE_REQ: u8 = 0x8

Source

pub const INTERACTION_OPCODE_INVOKE_RESP: u8 = 0x9

Source

pub const INTERACTION_OPCODE_TIMED_REQ: u8 = 0xa

Source

pub const PROTOCOL_ID_SECURE_CHANNEL: u16 = 0

Source

pub const PROTOCOL_ID_INTERACTION: u16 = 1

Source

pub const IM_STATUS_UNSUPPORTED_ATTRIBUTE: u8 = 0x86

Source

pub const IM_STATUS_INVALID_ACTION: u8 = 0x80

Source

pub const IM_STATUS_UNSUPPORTED_CLUSTER: u8 = 0xC3

Source

pub const IM_STATUS_UNSUPPORTED_EVENT: u8 = 0xC7

Source

pub fn encode(&self) -> Result<Vec<u8>>

Source

pub fn decode(data: &[u8]) -> Result<(Self, Vec<u8>)>

Trait Implementations§

Source§

impl Debug for ProtocolMessageHeader

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V