[][src]Struct dsf_core::wire::header::WireHeader

pub struct WireHeader<T: ImmutableData> { /* fields omitted */ }

Header generic over arbitrary storage for wire encoding

Implementations

impl<T: ImmutableData> WireHeader<T>[src]

pub fn new(buff: T) -> Self[src]

Create a new header object

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

pub fn application_id(&self) -> u16[src]

pub fn kind(&self) -> Kind[src]

pub fn flags(&self) -> Flags[src]

pub fn index(&self) -> u16[src]

pub fn data_len(&self) -> usize[src]

pub fn private_options_len(&self) -> usize[src]

pub fn public_options_len(&self) -> usize[src]

impl<T: MutableData> WireHeader<T>[src]

pub fn encode(&mut self, h: &Header)[src]

Write a base::Header

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

Set the protocol version

pub fn set_application_id(&mut self, application_id: u16)[src]

Set the application ID

pub fn set_flags(&mut self, flags: Flags)[src]

Set object flags

pub fn set_kind(&mut self, kind: Kind)[src]

Set the object kind

pub fn set_index(&mut self, index: u16)[src]

Set object index

pub fn set_data_len(&mut self, data_len: usize)[src]

Set the body field length

pub fn set_private_options_len(&mut self, private_options_len: usize)[src]

Set the private options field length

pub fn set_public_options_len(&mut self, public_options_len: usize)[src]

Set the public options field length

Trait Implementations

impl<'_, T: ImmutableData> From<&'_ WireHeader<T>> for Header[src]

fn from(wh: &WireHeader<T>) -> Header[src]

Build a base::Header object from a WireHeader

Auto Trait Implementations

impl<T> RefUnwindSafe for WireHeader<T> where
    T: RefUnwindSafe

impl<T> Send for WireHeader<T> where
    T: Send

impl<T> Sync for WireHeader<T> where
    T: Sync

impl<T> Unpin for WireHeader<T> where
    T: Unpin

impl<T> UnwindSafe for WireHeader<T> where
    T: UnwindSafe

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> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.