Enum pnet_macros_support::packet::MutPacketData
source · [−]Expand description
Mutable packet data.
Variants
Owned(Vec<u8>)
Owned mutable packet data.
Borrowed(&'p mut [u8])
Borrowed mutable packet data.
Implementations
sourceimpl<'p> MutPacketData<'p>
impl<'p> MutPacketData<'p>
sourcepub fn as_mut_slice(&mut self) -> &mut [u8]
pub fn as_mut_slice(&mut self) -> &mut [u8]
Get packet data as a mutable slice.
sourcepub fn to_immutable(self) -> PacketData<'p>
pub fn to_immutable(self) -> PacketData<'p>
Get an immutable version of packet data.
Trait Implementations
sourceimpl<'p> Index<Range<usize>> for MutPacketData<'p>
impl<'p> Index<Range<usize>> for MutPacketData<'p>
sourceimpl<'p> Index<RangeFrom<usize>> for MutPacketData<'p>
impl<'p> Index<RangeFrom<usize>> for MutPacketData<'p>
sourceimpl<'p> Index<RangeFull> for MutPacketData<'p>
impl<'p> Index<RangeFull> for MutPacketData<'p>
sourceimpl<'p> Index<RangeTo<usize>> for MutPacketData<'p>
impl<'p> Index<RangeTo<usize>> for MutPacketData<'p>
sourceimpl<'p> Index<usize> for MutPacketData<'p>
impl<'p> Index<usize> for MutPacketData<'p>
sourceimpl<'p> IndexMut<Range<usize>> for MutPacketData<'p>
impl<'p> IndexMut<Range<usize>> for MutPacketData<'p>
sourceimpl<'p> IndexMut<RangeFrom<usize>> for MutPacketData<'p>
impl<'p> IndexMut<RangeFrom<usize>> for MutPacketData<'p>
sourceimpl<'p> IndexMut<RangeFull> for MutPacketData<'p>
impl<'p> IndexMut<RangeFull> for MutPacketData<'p>
sourceimpl<'p> IndexMut<RangeTo<usize>> for MutPacketData<'p>
impl<'p> IndexMut<RangeTo<usize>> for MutPacketData<'p>
sourceimpl<'p> IndexMut<usize> for MutPacketData<'p>
impl<'p> IndexMut<usize> for MutPacketData<'p>
sourceimpl<'p> PartialEq<MutPacketData<'p>> for MutPacketData<'p>
impl<'p> PartialEq<MutPacketData<'p>> for MutPacketData<'p>
sourcefn eq(&self, other: &MutPacketData<'p>) -> bool
fn eq(&self, other: &MutPacketData<'p>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MutPacketData<'p>) -> bool
fn ne(&self, other: &MutPacketData<'p>) -> bool
This method tests for !=
.
impl<'p> StructuralPartialEq for MutPacketData<'p>
Auto Trait Implementations
impl<'p> RefUnwindSafe for MutPacketData<'p>
impl<'p> Send for MutPacketData<'p>
impl<'p> Sync for MutPacketData<'p>
impl<'p> Unpin for MutPacketData<'p>
impl<'p> !UnwindSafe for MutPacketData<'p>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more