GenericHeader

Trait GenericHeader 

Source
pub trait GenericHeader: Sized {
    // Required methods
    fn pdu_type(&self) -> PduType;
    fn set_pdu_type(&mut self, value: PduType);
    fn protocol_family(&self) -> ProtocolFamily;
    fn set_protocol_family(&mut self, value: ProtocolFamily);
    fn length(&self) -> u16;
    fn set_length(&mut self, value: u16);
    fn serialize(&self, buf: &mut BytesMut);
    fn deserialize<B: Buf>(bug: &mut B) -> Self;
}

Required Methods§

Source

fn pdu_type(&self) -> PduType

Source

fn set_pdu_type(&mut self, value: PduType)

Source

fn protocol_family(&self) -> ProtocolFamily

Source

fn set_protocol_family(&mut self, value: ProtocolFamily)

Source

fn length(&self) -> u16

Source

fn set_length(&mut self, value: u16)

Source

fn serialize(&self, buf: &mut BytesMut)

Source

fn deserialize<B: Buf>(bug: &mut B) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§