pub struct RawPacket { /* private fields */ }
Implementations§
Source§impl RawPacket
impl RawPacket
pub fn new(buffer: [u8; 1500], length: usize) -> Self
pub fn get_header<'a>(&'a self) -> &'a Header
pub fn get_header_mut<'a>(&'a mut self) -> &'a mut Header
pub fn get_buffer(&self) -> &[u8] ⓘ
pub fn get_buffer_mut(&mut self) -> &mut [u8] ⓘ
pub fn get_body(&self) -> &[u8] ⓘ
pub fn get_body_mut(&mut self) -> &mut [u8] ⓘ
pub fn verify(self, secret: &Secret) -> Option<IncomingPacket>
Auto Trait Implementations§
impl Freeze for RawPacket
impl RefUnwindSafe for RawPacket
impl Send for RawPacket
impl Sync for RawPacket
impl Unpin for RawPacket
impl UnwindSafe for RawPacket
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