Struct ssh_packet::Packet
source · 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.
sourcepub async fn from_async_reader<R, C>(
reader: &mut R,
cipher: &mut C,
seq: u32,
) -> Result<Self, C::Err>
Available on crate feature futures only.
pub async fn from_async_reader<R, C>( reader: &mut R, cipher: &mut C, seq: u32, ) -> Result<Self, C::Err>
futures only.Read a Packet from the provided asynchronous reader.
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)