Trait PtpHeader

Source
pub trait PtpHeader: PtpHeaderBase {
    // Provided methods
    fn has_mac(&self) -> bool { ... }
    fn set_mac(&mut self, has_mac: bool) { ... }
    fn packet_type(&self) -> u8 { ... }
    fn set_packet_type(&mut self, packet_type: u8) { ... }
    fn flags(&self) -> (bool, bool, bool) { ... }
    fn set_flags(&mut self, flags: (bool, bool, bool)) { ... }
}

Provided Methods§

Source

fn has_mac(&self) -> bool

Returns true if the packet has a MAC (according to the flags)

Source

fn set_mac(&mut self, has_mac: bool)

Sets the MAC flag

Source

fn packet_type(&self) -> u8

Returns the packet type

Source

fn set_packet_type(&mut self, packet_type: u8)

Sets the packet type

Source

fn flags(&self) -> (bool, bool, bool)

Returns the 3 extra flags which differ per packet type

Source

fn set_flags(&mut self, flags: (bool, bool, bool))

Sets the 3 extra flags (which differ per packet type)

Implementors§