Trait PacketExt

Source
pub trait PacketExt {
    // Required methods
    fn has_data(&self) -> bool;
    fn port(&self) -> &str;
    fn flags(&self) -> u8;

    // Provided methods
    fn is_noop(&self) -> bool { ... }
    fn is_fatal_error(&self) -> bool { ... }
    fn is_signal(&self) -> bool { ... }
    fn is_bracket(&self) -> bool { ... }
    fn is_done(&self) -> bool { ... }
    fn is_open_bracket(&self) -> bool { ... }
    fn is_close_bracket(&self) -> bool { ... }
}
Expand description

Required Methods§

Source

fn has_data(&self) -> bool

Returns true if the packet contains data in the payload.

Source

fn port(&self) -> &str

Get the port for this packet.

Source

fn flags(&self) -> u8

Get the inner payload of this packet.

Provided Methods§

Source

fn is_noop(&self) -> bool

Return true if this is a No-Op packet. No action should be taken.

Source

fn is_fatal_error(&self) -> bool

Return true if this is a fatal, component wide error packet.

Source

fn is_signal(&self) -> bool

Returns true if this packet is a signal packet (i.e. done, open_bracket, close_bracket, etc).

Source

fn is_bracket(&self) -> bool

Returns true if this packet is a bracket packet (i.e open_bracket, close_bracket, etc).

Source

fn is_done(&self) -> bool

Returns true if this packet is a done packet.

Source

fn is_open_bracket(&self) -> bool

Returns true if this packet is an open bracket packet.

Source

fn is_close_bracket(&self) -> bool

Returns true if this packet is a close bracket packet.

Implementors§