pub enum PacketBufferError {
PacketTooLarge(PacketTooLarge),
Bounds(Bounds),
SideDataEntries(SideDataEntries),
SideDataArray(SideDataArray),
SideDataPayload(SideDataPayload),
SideDataBytes(SideDataBytes),
UnrepresentableFlags(UnrepresentableFlags),
TrustedPayload(TrustedPayload),
CaptureFailed(CaptureFailed),
SharedPayload(SharedPayload),
SideDataAlloc(SideDataAlloc),
}Expand description
Why a packet could not be carried across the boundary — its payload, or the side data that comes with it.
Every arm means the bytes are real and this crate could not carry
them — never that there were none. “No payload” is Ok(None) from
[payload_of], and keeping the two apart is the whole point of the
type: a demuxer that reads a malformed packet as an empty marker
drops a video packet and carries on as though the file said so. The
side-data arms exist for the same reason one tier along — a packet
whose side data cannot be carried whole is refused, never delivered
with some of it.
Variants§
PacketTooLarge(PacketTooLarge)
The payload is larger than the budget in force. Refused before the copy.
Bounds(Bounds)
The payload does not lie inside the packet’s own buffer.
SideDataEntries(SideDataEntries)
A packet declares more side-data entries than this crate will walk, or a negative count.
SideDataArray(SideDataArray)
A packet declares side-data entries and carries no array to read them from.
SideDataPayload(SideDataPayload)
A side-data entry declares bytes it does not carry.
SideDataBytes(SideDataBytes)
A packet’s side data is larger than this crate will copy.
UnrepresentableFlags(UnrepresentableFlags)
A packet carries flag bits the portable vocabulary cannot hold.
TrustedPayload(TrustedPayload)
A packet is marked AV_PKT_FLAG_TRUSTED, so its payload may hold
pointers rather than bytes. See TrustedPayload.
CaptureFailed(CaptureFailed)
The capture itself failed — an allocation on the owned lane, a
refcount on the view lane. See [CaptureFailed].
The payload’s buffer is referenced by something other than the
packet it came from. See [SharedPayload].
SideDataAlloc(SideDataAlloc)
Out of memory copying a side-data entry.
Implementations§
Source§impl PacketBufferError
impl PacketBufferError
Sourcepub const fn is_packet_too_large(&self) -> bool
pub const fn is_packet_too_large(&self) -> bool
Returns true if this value is of type PacketTooLarge. Returns false otherwise
Sourcepub const fn is_bounds(&self) -> bool
pub const fn is_bounds(&self) -> bool
Returns true if this value is of type Bounds. Returns false otherwise
Sourcepub const fn is_side_data_entries(&self) -> bool
pub const fn is_side_data_entries(&self) -> bool
Returns true if this value is of type SideDataEntries. Returns false otherwise
Sourcepub const fn is_side_data_array(&self) -> bool
pub const fn is_side_data_array(&self) -> bool
Returns true if this value is of type SideDataArray. Returns false otherwise
Sourcepub const fn is_side_data_payload(&self) -> bool
pub const fn is_side_data_payload(&self) -> bool
Returns true if this value is of type SideDataPayload. Returns false otherwise
Sourcepub const fn is_side_data_bytes(&self) -> bool
pub const fn is_side_data_bytes(&self) -> bool
Returns true if this value is of type SideDataBytes. Returns false otherwise
Sourcepub const fn is_unrepresentable_flags(&self) -> bool
pub const fn is_unrepresentable_flags(&self) -> bool
Returns true if this value is of type UnrepresentableFlags. Returns false otherwise
Sourcepub const fn is_trusted_payload(&self) -> bool
pub const fn is_trusted_payload(&self) -> bool
Returns true if this value is of type TrustedPayload. Returns false otherwise
Sourcepub const fn is_capture_failed(&self) -> bool
pub const fn is_capture_failed(&self) -> bool
Returns true if this value is of type CaptureFailed. Returns false otherwise
Returns true if this value is of type SharedPayload. Returns false otherwise
Sourcepub const fn is_side_data_alloc(&self) -> bool
pub const fn is_side_data_alloc(&self) -> bool
Returns true if this value is of type SideDataAlloc. Returns false otherwise
Source§impl PacketBufferError
impl PacketBufferError
Sourcepub fn unwrap_packet_too_large(self) -> PacketTooLarge
pub fn unwrap_packet_too_large(self) -> PacketTooLarge
Unwraps this value to the PacketBufferError::PacketTooLarge variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_packet_too_large_ref(&self) -> &PacketTooLarge
pub fn unwrap_packet_too_large_ref(&self) -> &PacketTooLarge
Unwraps this reference to the PacketBufferError::PacketTooLarge variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_packet_too_large_mut(&mut self) -> &mut PacketTooLarge
pub fn unwrap_packet_too_large_mut(&mut self) -> &mut PacketTooLarge
Unwraps this mutable reference to the PacketBufferError::PacketTooLarge variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_bounds(self) -> Bounds
pub fn unwrap_bounds(self) -> Bounds
Unwraps this value to the PacketBufferError::Bounds variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_bounds_ref(&self) -> &Bounds
pub fn unwrap_bounds_ref(&self) -> &Bounds
Unwraps this reference to the PacketBufferError::Bounds variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_bounds_mut(&mut self) -> &mut Bounds
pub fn unwrap_bounds_mut(&mut self) -> &mut Bounds
Unwraps this mutable reference to the PacketBufferError::Bounds variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_entries(self) -> SideDataEntries
pub fn unwrap_side_data_entries(self) -> SideDataEntries
Unwraps this value to the PacketBufferError::SideDataEntries variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_entries_ref(&self) -> &SideDataEntries
pub fn unwrap_side_data_entries_ref(&self) -> &SideDataEntries
Unwraps this reference to the PacketBufferError::SideDataEntries variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_entries_mut(&mut self) -> &mut SideDataEntries
pub fn unwrap_side_data_entries_mut(&mut self) -> &mut SideDataEntries
Unwraps this mutable reference to the PacketBufferError::SideDataEntries variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_array(self) -> SideDataArray
pub fn unwrap_side_data_array(self) -> SideDataArray
Unwraps this value to the PacketBufferError::SideDataArray variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_array_ref(&self) -> &SideDataArray
pub fn unwrap_side_data_array_ref(&self) -> &SideDataArray
Unwraps this reference to the PacketBufferError::SideDataArray variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_array_mut(&mut self) -> &mut SideDataArray
pub fn unwrap_side_data_array_mut(&mut self) -> &mut SideDataArray
Unwraps this mutable reference to the PacketBufferError::SideDataArray variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_payload(self) -> SideDataPayload
pub fn unwrap_side_data_payload(self) -> SideDataPayload
Unwraps this value to the PacketBufferError::SideDataPayload variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_payload_ref(&self) -> &SideDataPayload
pub fn unwrap_side_data_payload_ref(&self) -> &SideDataPayload
Unwraps this reference to the PacketBufferError::SideDataPayload variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_payload_mut(&mut self) -> &mut SideDataPayload
pub fn unwrap_side_data_payload_mut(&mut self) -> &mut SideDataPayload
Unwraps this mutable reference to the PacketBufferError::SideDataPayload variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_bytes(self) -> SideDataBytes
pub fn unwrap_side_data_bytes(self) -> SideDataBytes
Unwraps this value to the PacketBufferError::SideDataBytes variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_bytes_ref(&self) -> &SideDataBytes
pub fn unwrap_side_data_bytes_ref(&self) -> &SideDataBytes
Unwraps this reference to the PacketBufferError::SideDataBytes variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_bytes_mut(&mut self) -> &mut SideDataBytes
pub fn unwrap_side_data_bytes_mut(&mut self) -> &mut SideDataBytes
Unwraps this mutable reference to the PacketBufferError::SideDataBytes variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_unrepresentable_flags(self) -> UnrepresentableFlags
pub fn unwrap_unrepresentable_flags(self) -> UnrepresentableFlags
Unwraps this value to the PacketBufferError::UnrepresentableFlags variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_unrepresentable_flags_ref(&self) -> &UnrepresentableFlags
pub fn unwrap_unrepresentable_flags_ref(&self) -> &UnrepresentableFlags
Unwraps this reference to the PacketBufferError::UnrepresentableFlags variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_unrepresentable_flags_mut(&mut self) -> &mut UnrepresentableFlags
pub fn unwrap_unrepresentable_flags_mut(&mut self) -> &mut UnrepresentableFlags
Unwraps this mutable reference to the PacketBufferError::UnrepresentableFlags variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_trusted_payload(self) -> TrustedPayload
pub fn unwrap_trusted_payload(self) -> TrustedPayload
Unwraps this value to the PacketBufferError::TrustedPayload variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_trusted_payload_ref(&self) -> &TrustedPayload
pub fn unwrap_trusted_payload_ref(&self) -> &TrustedPayload
Unwraps this reference to the PacketBufferError::TrustedPayload variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_trusted_payload_mut(&mut self) -> &mut TrustedPayload
pub fn unwrap_trusted_payload_mut(&mut self) -> &mut TrustedPayload
Unwraps this mutable reference to the PacketBufferError::TrustedPayload variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_capture_failed(self) -> CaptureFailed
pub fn unwrap_capture_failed(self) -> CaptureFailed
Unwraps this value to the PacketBufferError::CaptureFailed variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_capture_failed_ref(&self) -> &CaptureFailed
pub fn unwrap_capture_failed_ref(&self) -> &CaptureFailed
Unwraps this reference to the PacketBufferError::CaptureFailed variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_capture_failed_mut(&mut self) -> &mut CaptureFailed
pub fn unwrap_capture_failed_mut(&mut self) -> &mut CaptureFailed
Unwraps this mutable reference to the PacketBufferError::CaptureFailed variant.
Panics if this value is of any other type.
Unwraps this value to the PacketBufferError::SharedPayload variant.
Panics if this value is of any other type.
Unwraps this reference to the PacketBufferError::SharedPayload variant.
Panics if this value is of any other type.
Unwraps this mutable reference to the PacketBufferError::SharedPayload variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_alloc(self) -> SideDataAlloc
pub fn unwrap_side_data_alloc(self) -> SideDataAlloc
Unwraps this value to the PacketBufferError::SideDataAlloc variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_alloc_ref(&self) -> &SideDataAlloc
pub fn unwrap_side_data_alloc_ref(&self) -> &SideDataAlloc
Unwraps this reference to the PacketBufferError::SideDataAlloc variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_side_data_alloc_mut(&mut self) -> &mut SideDataAlloc
pub fn unwrap_side_data_alloc_mut(&mut self) -> &mut SideDataAlloc
Unwraps this mutable reference to the PacketBufferError::SideDataAlloc variant.
Panics if this value is of any other type.
Source§impl PacketBufferError
impl PacketBufferError
Sourcepub fn try_unwrap_packet_too_large(
self,
) -> Result<PacketTooLarge, TryUnwrapError<Self>>
pub fn try_unwrap_packet_too_large( self, ) -> Result<PacketTooLarge, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBufferError::PacketTooLarge variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_packet_too_large_ref(
&self,
) -> Result<&PacketTooLarge, TryUnwrapError<&Self>>
pub fn try_unwrap_packet_too_large_ref( &self, ) -> Result<&PacketTooLarge, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBufferError::PacketTooLarge variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_packet_too_large_mut(
&mut self,
) -> Result<&mut PacketTooLarge, TryUnwrapError<&mut Self>>
pub fn try_unwrap_packet_too_large_mut( &mut self, ) -> Result<&mut PacketTooLarge, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBufferError::PacketTooLarge variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_bounds(self) -> Result<Bounds, TryUnwrapError<Self>>
pub fn try_unwrap_bounds(self) -> Result<Bounds, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBufferError::Bounds variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_bounds_ref(&self) -> Result<&Bounds, TryUnwrapError<&Self>>
pub fn try_unwrap_bounds_ref(&self) -> Result<&Bounds, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBufferError::Bounds variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_bounds_mut(
&mut self,
) -> Result<&mut Bounds, TryUnwrapError<&mut Self>>
pub fn try_unwrap_bounds_mut( &mut self, ) -> Result<&mut Bounds, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBufferError::Bounds variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_entries(
self,
) -> Result<SideDataEntries, TryUnwrapError<Self>>
pub fn try_unwrap_side_data_entries( self, ) -> Result<SideDataEntries, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBufferError::SideDataEntries variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_entries_ref(
&self,
) -> Result<&SideDataEntries, TryUnwrapError<&Self>>
pub fn try_unwrap_side_data_entries_ref( &self, ) -> Result<&SideDataEntries, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBufferError::SideDataEntries variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_entries_mut(
&mut self,
) -> Result<&mut SideDataEntries, TryUnwrapError<&mut Self>>
pub fn try_unwrap_side_data_entries_mut( &mut self, ) -> Result<&mut SideDataEntries, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBufferError::SideDataEntries variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_array(
self,
) -> Result<SideDataArray, TryUnwrapError<Self>>
pub fn try_unwrap_side_data_array( self, ) -> Result<SideDataArray, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBufferError::SideDataArray variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_array_ref(
&self,
) -> Result<&SideDataArray, TryUnwrapError<&Self>>
pub fn try_unwrap_side_data_array_ref( &self, ) -> Result<&SideDataArray, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBufferError::SideDataArray variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_array_mut(
&mut self,
) -> Result<&mut SideDataArray, TryUnwrapError<&mut Self>>
pub fn try_unwrap_side_data_array_mut( &mut self, ) -> Result<&mut SideDataArray, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBufferError::SideDataArray variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_payload(
self,
) -> Result<SideDataPayload, TryUnwrapError<Self>>
pub fn try_unwrap_side_data_payload( self, ) -> Result<SideDataPayload, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBufferError::SideDataPayload variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_payload_ref(
&self,
) -> Result<&SideDataPayload, TryUnwrapError<&Self>>
pub fn try_unwrap_side_data_payload_ref( &self, ) -> Result<&SideDataPayload, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBufferError::SideDataPayload variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_payload_mut(
&mut self,
) -> Result<&mut SideDataPayload, TryUnwrapError<&mut Self>>
pub fn try_unwrap_side_data_payload_mut( &mut self, ) -> Result<&mut SideDataPayload, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBufferError::SideDataPayload variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_bytes(
self,
) -> Result<SideDataBytes, TryUnwrapError<Self>>
pub fn try_unwrap_side_data_bytes( self, ) -> Result<SideDataBytes, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBufferError::SideDataBytes variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_bytes_ref(
&self,
) -> Result<&SideDataBytes, TryUnwrapError<&Self>>
pub fn try_unwrap_side_data_bytes_ref( &self, ) -> Result<&SideDataBytes, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBufferError::SideDataBytes variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_bytes_mut(
&mut self,
) -> Result<&mut SideDataBytes, TryUnwrapError<&mut Self>>
pub fn try_unwrap_side_data_bytes_mut( &mut self, ) -> Result<&mut SideDataBytes, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBufferError::SideDataBytes variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_unrepresentable_flags(
self,
) -> Result<UnrepresentableFlags, TryUnwrapError<Self>>
pub fn try_unwrap_unrepresentable_flags( self, ) -> Result<UnrepresentableFlags, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBufferError::UnrepresentableFlags variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_unrepresentable_flags_ref(
&self,
) -> Result<&UnrepresentableFlags, TryUnwrapError<&Self>>
pub fn try_unwrap_unrepresentable_flags_ref( &self, ) -> Result<&UnrepresentableFlags, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBufferError::UnrepresentableFlags variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_unrepresentable_flags_mut(
&mut self,
) -> Result<&mut UnrepresentableFlags, TryUnwrapError<&mut Self>>
pub fn try_unwrap_unrepresentable_flags_mut( &mut self, ) -> Result<&mut UnrepresentableFlags, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBufferError::UnrepresentableFlags variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_trusted_payload(
self,
) -> Result<TrustedPayload, TryUnwrapError<Self>>
pub fn try_unwrap_trusted_payload( self, ) -> Result<TrustedPayload, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBufferError::TrustedPayload variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_trusted_payload_ref(
&self,
) -> Result<&TrustedPayload, TryUnwrapError<&Self>>
pub fn try_unwrap_trusted_payload_ref( &self, ) -> Result<&TrustedPayload, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBufferError::TrustedPayload variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_trusted_payload_mut(
&mut self,
) -> Result<&mut TrustedPayload, TryUnwrapError<&mut Self>>
pub fn try_unwrap_trusted_payload_mut( &mut self, ) -> Result<&mut TrustedPayload, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBufferError::TrustedPayload variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_capture_failed(
self,
) -> Result<CaptureFailed, TryUnwrapError<Self>>
pub fn try_unwrap_capture_failed( self, ) -> Result<CaptureFailed, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBufferError::CaptureFailed variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_capture_failed_ref(
&self,
) -> Result<&CaptureFailed, TryUnwrapError<&Self>>
pub fn try_unwrap_capture_failed_ref( &self, ) -> Result<&CaptureFailed, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBufferError::CaptureFailed variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_capture_failed_mut(
&mut self,
) -> Result<&mut CaptureFailed, TryUnwrapError<&mut Self>>
pub fn try_unwrap_capture_failed_mut( &mut self, ) -> Result<&mut CaptureFailed, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBufferError::CaptureFailed variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Attempts to unwrap this value to the PacketBufferError::SharedPayload variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Attempts to unwrap this reference to the PacketBufferError::SharedPayload variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Attempts to unwrap this mutable reference to the PacketBufferError::SharedPayload variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_alloc(
self,
) -> Result<SideDataAlloc, TryUnwrapError<Self>>
pub fn try_unwrap_side_data_alloc( self, ) -> Result<SideDataAlloc, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBufferError::SideDataAlloc variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_alloc_ref(
&self,
) -> Result<&SideDataAlloc, TryUnwrapError<&Self>>
pub fn try_unwrap_side_data_alloc_ref( &self, ) -> Result<&SideDataAlloc, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBufferError::SideDataAlloc variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_side_data_alloc_mut(
&mut self,
) -> Result<&mut SideDataAlloc, TryUnwrapError<&mut Self>>
pub fn try_unwrap_side_data_alloc_mut( &mut self, ) -> Result<&mut SideDataAlloc, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBufferError::SideDataAlloc variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Trait Implementations§
Source§impl Clone for PacketBufferError
impl Clone for PacketBufferError
Source§fn clone(&self) -> PacketBufferError
fn clone(&self) -> PacketBufferError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PacketBufferError
Source§impl Debug for PacketBufferError
impl Debug for PacketBufferError
Source§impl Display for PacketBufferError
impl Display for PacketBufferError
impl Eq for PacketBufferError
Source§impl Error for PacketBufferError
impl Error for PacketBufferError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()