pub struct Packet { /* private fields */ }
Implementations§
Source§impl Packet
impl Packet
pub fn new() -> Self
pub fn from_buffer(buffer: Buffer) -> Self
pub fn get_buffer(&self) -> &Buffer
pub fn get_buffer_mut(&mut self) -> &mut Buffer
pub fn get_header<'a>(&'a self) -> &'a Header
pub fn get_header_mut<'a>(&'a mut self) -> &'a mut Header
pub fn get_slice(&self, start: usize, end: usize) -> &[u8] ⓘ
pub fn get_slice_mut(&mut self, start: usize, end: usize) -> &mut [u8] ⓘ
pub fn sign(&mut self, key: &[u8])
pub fn verify_signature(&self, key: &[u8]) -> bool
pub fn into_buffer(self) -> Buffer
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more