Struct ssh_packet::Packet
source · pub struct Packet {
pub payload: Vec<u8>,
}
Expand description
A SSH 2.0 binary packet representation, including it’s encrypted payload.
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 write<T>(message: &T) -> Result<Self, Error>
pub fn write<T>(message: &T) -> Result<Self, Error>
Write T
to a Packet
to be sent to the remote.
sourcepub async fn from_async_reader<R, C>(
reader: &mut R,
cipher: &mut C,
seq: u32
) -> Result<Self, C::Err>where
R: AsyncRead + Unpin,
C: OpeningCipher,
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>where
R: AsyncRead + Unpin,
C: OpeningCipher,
futures
only.Read a Packet
from the provided asynchronous reader
.
Trait Implementations§
Auto Trait Implementations§
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