pub struct Packet {
pub payload: Vec<u8>,
}
Expand description
A SSH 2.0 binary packet representation.
see https://datatracker.ietf.org/doc/html/rfc4253#section-6.
Fields§
§payload: Vec<u8>
SSH packet’s payload as binary.
Implementations§
Source§impl Packet
impl Packet
Sourcepub fn to<T: for<'a> BinRead<Args<'a> = ()> + ReadEndian>(
&self,
) -> Result<T, Error>
pub fn to<T: for<'a> BinRead<Args<'a> = ()> + ReadEndian>( &self, ) -> Result<T, Error>
Try to deserialize the Packet
into T
.
Trait Implementations§
Source§impl IntoPacket for Packet
impl IntoPacket for Packet
Source§fn into_packet(self) -> Packet
fn into_packet(self) -> Packet
Convert the current type to a
Packet
.Auto Trait Implementations§
impl Freeze for Packet
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnwindSafe for Packet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more