Skip to main content

Packet

Trait Packet 

Source
pub trait Packet:
    for<'r> BinRead<Args<'r> = ()>
    + ReadEndian
    + for<'w> BinWrite<Args<'w> = ()>
    + WriteEndian {
    // Provided methods
    fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error> { ... }
    fn to_bytes(&self) -> Vec<u8>  { ... }
}
Expand description

A trait representing a packet in the SSH protocol.

Provided Methods§

Source

fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error>

Convert from binary wire format.

Source

fn to_bytes(&self) -> Vec<u8>

Convert to binary wire format.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§