pub enum MutPacketData<'p> {
Owned(Vec<u8>),
Borrowed(&'p mut [u8]),
}
Expand description
Mutable packet data.
Variants§
Implementations§
Source§impl<'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§
Source§impl<'p> Index<RangeFull> for MutPacketData<'p>
impl<'p> Index<RangeFull> for MutPacketData<'p>
Source§impl<'p> Index<usize> for MutPacketData<'p>
impl<'p> Index<usize> for MutPacketData<'p>
Source§impl<'p> IndexMut<RangeFull> for MutPacketData<'p>
impl<'p> IndexMut<RangeFull> for MutPacketData<'p>
Source§impl<'p> IndexMut<usize> for MutPacketData<'p>
impl<'p> IndexMut<usize> for MutPacketData<'p>
Source§impl<'p> PartialEq for MutPacketData<'p>
impl<'p> PartialEq for MutPacketData<'p>
impl<'p> StructuralPartialEq for MutPacketData<'p>
Auto Trait Implementations§
impl<'p> Freeze for MutPacketData<'p>
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§
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