pub struct Padding { /* private fields */ }
Expand description
Implementations§
Source§impl Padding
impl Padding
Sourcepub fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>
pub fn from_slice(packet_version: Version, input: &[u8]) -> Result<Self>
Parses a Padding
packet from the given slice.
Sourcepub fn new<R: CryptoRng + RngCore>(
rng: R,
packet_version: Version,
size: usize,
) -> Self
pub fn new<R: CryptoRng + RngCore>( rng: R, packet_version: Version, size: usize, ) -> Self
Create a new padding packet of size
in bytes.
pub fn packet_version(&self) -> Version
Trait Implementations§
Source§impl PacketTrait for Padding
impl PacketTrait for Padding
impl Eq for Padding
impl StructuralPartialEq for Padding
Auto Trait Implementations§
impl Freeze for Padding
impl RefUnwindSafe for Padding
impl Send for Padding
impl Sync for Padding
impl Unpin for Padding
impl UnwindSafe for Padding
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