[−]Enum pnet::packet::PacketData
Packet data.
Variants
A packet owns its contents.
A packet borrows its contents.
Implementations
impl<'p> PacketData<'p>
pub fn as_slice(&self) -> &[u8]
Get a slice of the packet data.
pub fn to_immutable(self) -> PacketData<'p>
No-op - returns self
.
pub fn len(&self) -> usize
A length of the packet data.
Trait Implementations
impl<'p> Index<Range<usize>> for PacketData<'p>
type Output = [u8]
The returned type after indexing.
pub fn index(&self, index: Range<usize>) -> &[u8]
impl<'p> Index<RangeFrom<usize>> for PacketData<'p>
type Output = [u8]
The returned type after indexing.
pub fn index(&self, index: RangeFrom<usize>) -> &[u8]
impl<'p> Index<RangeFull> for PacketData<'p>
impl<'p> Index<RangeTo<usize>> for PacketData<'p>
type Output = [u8]
The returned type after indexing.
pub fn index(&self, index: RangeTo<usize>) -> &[u8]
impl<'p> Index<usize> for PacketData<'p>
impl<'p> PartialEq<PacketData<'p>> for PacketData<'p>
pub fn eq(&self, other: &PacketData<'p>) -> bool
pub fn ne(&self, other: &PacketData<'p>) -> bool
impl<'p> StructuralPartialEq for PacketData<'p>
Auto Trait Implementations
impl<'p> RefUnwindSafe for PacketData<'p>
impl<'p> Send for PacketData<'p>
impl<'p> Sync for PacketData<'p>
impl<'p> Unpin for PacketData<'p>
impl<'p> UnwindSafe for PacketData<'p>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,