pub enum PacketBuildError {
SendPayloadTooLarge(SendPayloadTooLarge),
Ffmpeg(Error),
UnknownSideData(UnknownSideData),
SideDataAlloc(SideDataAlloc),
TrustedPayload(TrustedPayload),
SendSideDataTooLarge(SendSideDataTooLarge),
}Expand description
Why a portable packet could not be rebuilt as an AVPacket.
The reverse direction is what feeds a decoder, so everything the forward direction captured has to survive it or the capture was theatre.
Variants§
SendPayloadTooLarge(SendPayloadTooLarge)
The payload is larger than the session’s budget allows. Refused
before the AVPacket is allocated — the into-FFmpeg leg of
the budget the outbound leg already kept.
Ffmpeg(Error)
The packet body could not be allocated or is larger than
AVPacket.size can hold.
UnknownSideData(UnknownSideData)
A side-data entry whose type this build of FFmpeg does not name.
SideDataAlloc(SideDataAlloc)
FFmpeg refused the side-data allocation.
TrustedPayload(TrustedPayload)
The packet is marked AV_PKT_FLAG_TRUSTED. See
crate::buffer::TrustedPayload — the other leg of the same
refusal.
SendSideDataTooLarge(SendSideDataTooLarge)
The packet’s side-data list is over the entry or byte cap the read
side has always applied. See SendSideDataTooLarge.
Implementations§
Source§impl PacketBuildError
impl PacketBuildError
Sourcepub const fn is_send_payload_too_large(&self) -> bool
pub const fn is_send_payload_too_large(&self) -> bool
Returns true if this value is of type SendPayloadTooLarge. Returns false otherwise
Sourcepub const fn is_ffmpeg(&self) -> bool
pub const fn is_ffmpeg(&self) -> bool
Returns true if this value is of type Ffmpeg. Returns false otherwise
Sourcepub const fn is_unknown_side_data(&self) -> bool
pub const fn is_unknown_side_data(&self) -> bool
Returns true if this value is of type UnknownSideData. 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
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_send_side_data_too_large(&self) -> bool
pub const fn is_send_side_data_too_large(&self) -> bool
Returns true if this value is of type SendSideDataTooLarge. Returns false otherwise
Source§impl PacketBuildError
impl PacketBuildError
Sourcepub fn unwrap_send_payload_too_large(self) -> SendPayloadTooLarge
pub fn unwrap_send_payload_too_large(self) -> SendPayloadTooLarge
Unwraps this value to the PacketBuildError::SendPayloadTooLarge variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_send_payload_too_large_ref(&self) -> &SendPayloadTooLarge
pub fn unwrap_send_payload_too_large_ref(&self) -> &SendPayloadTooLarge
Unwraps this reference to the PacketBuildError::SendPayloadTooLarge variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_send_payload_too_large_mut(&mut self) -> &mut SendPayloadTooLarge
pub fn unwrap_send_payload_too_large_mut(&mut self) -> &mut SendPayloadTooLarge
Unwraps this mutable reference to the PacketBuildError::SendPayloadTooLarge variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_ffmpeg(self) -> Error
pub fn unwrap_ffmpeg(self) -> Error
Unwraps this value to the PacketBuildError::Ffmpeg variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_ffmpeg_ref(&self) -> &Error
pub fn unwrap_ffmpeg_ref(&self) -> &Error
Unwraps this reference to the PacketBuildError::Ffmpeg variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_ffmpeg_mut(&mut self) -> &mut Error
pub fn unwrap_ffmpeg_mut(&mut self) -> &mut Error
Unwraps this mutable reference to the PacketBuildError::Ffmpeg variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_unknown_side_data(self) -> UnknownSideData
pub fn unwrap_unknown_side_data(self) -> UnknownSideData
Unwraps this value to the PacketBuildError::UnknownSideData variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_unknown_side_data_ref(&self) -> &UnknownSideData
pub fn unwrap_unknown_side_data_ref(&self) -> &UnknownSideData
Unwraps this reference to the PacketBuildError::UnknownSideData variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_unknown_side_data_mut(&mut self) -> &mut UnknownSideData
pub fn unwrap_unknown_side_data_mut(&mut self) -> &mut UnknownSideData
Unwraps this mutable reference to the PacketBuildError::UnknownSideData 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 PacketBuildError::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 PacketBuildError::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 PacketBuildError::SideDataAlloc 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 PacketBuildError::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 PacketBuildError::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 PacketBuildError::TrustedPayload variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_send_side_data_too_large(self) -> SendSideDataTooLarge
pub fn unwrap_send_side_data_too_large(self) -> SendSideDataTooLarge
Unwraps this value to the PacketBuildError::SendSideDataTooLarge variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_send_side_data_too_large_ref(&self) -> &SendSideDataTooLarge
pub fn unwrap_send_side_data_too_large_ref(&self) -> &SendSideDataTooLarge
Unwraps this reference to the PacketBuildError::SendSideDataTooLarge variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_send_side_data_too_large_mut(
&mut self,
) -> &mut SendSideDataTooLarge
pub fn unwrap_send_side_data_too_large_mut( &mut self, ) -> &mut SendSideDataTooLarge
Unwraps this mutable reference to the PacketBuildError::SendSideDataTooLarge variant.
Panics if this value is of any other type.
Source§impl PacketBuildError
impl PacketBuildError
Sourcepub fn try_unwrap_send_payload_too_large(
self,
) -> Result<SendPayloadTooLarge, TryUnwrapError<Self>>
pub fn try_unwrap_send_payload_too_large( self, ) -> Result<SendPayloadTooLarge, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBuildError::SendPayloadTooLarge variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_send_payload_too_large_ref(
&self,
) -> Result<&SendPayloadTooLarge, TryUnwrapError<&Self>>
pub fn try_unwrap_send_payload_too_large_ref( &self, ) -> Result<&SendPayloadTooLarge, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBuildError::SendPayloadTooLarge variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_send_payload_too_large_mut(
&mut self,
) -> Result<&mut SendPayloadTooLarge, TryUnwrapError<&mut Self>>
pub fn try_unwrap_send_payload_too_large_mut( &mut self, ) -> Result<&mut SendPayloadTooLarge, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBuildError::SendPayloadTooLarge variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_ffmpeg(self) -> Result<Error, TryUnwrapError<Self>>
pub fn try_unwrap_ffmpeg(self) -> Result<Error, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBuildError::Ffmpeg variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_ffmpeg_ref(&self) -> Result<&Error, TryUnwrapError<&Self>>
pub fn try_unwrap_ffmpeg_ref(&self) -> Result<&Error, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBuildError::Ffmpeg variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_ffmpeg_mut(
&mut self,
) -> Result<&mut Error, TryUnwrapError<&mut Self>>
pub fn try_unwrap_ffmpeg_mut( &mut self, ) -> Result<&mut Error, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBuildError::Ffmpeg variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_unknown_side_data(
self,
) -> Result<UnknownSideData, TryUnwrapError<Self>>
pub fn try_unwrap_unknown_side_data( self, ) -> Result<UnknownSideData, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBuildError::UnknownSideData variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_unknown_side_data_ref(
&self,
) -> Result<&UnknownSideData, TryUnwrapError<&Self>>
pub fn try_unwrap_unknown_side_data_ref( &self, ) -> Result<&UnknownSideData, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBuildError::UnknownSideData variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_unknown_side_data_mut(
&mut self,
) -> Result<&mut UnknownSideData, TryUnwrapError<&mut Self>>
pub fn try_unwrap_unknown_side_data_mut( &mut self, ) -> Result<&mut UnknownSideData, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBuildError::UnknownSideData 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 PacketBuildError::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 PacketBuildError::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 PacketBuildError::SideDataAlloc 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 PacketBuildError::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 PacketBuildError::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 PacketBuildError::TrustedPayload variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_send_side_data_too_large(
self,
) -> Result<SendSideDataTooLarge, TryUnwrapError<Self>>
pub fn try_unwrap_send_side_data_too_large( self, ) -> Result<SendSideDataTooLarge, TryUnwrapError<Self>>
Attempts to unwrap this value to the PacketBuildError::SendSideDataTooLarge variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_send_side_data_too_large_ref(
&self,
) -> Result<&SendSideDataTooLarge, TryUnwrapError<&Self>>
pub fn try_unwrap_send_side_data_too_large_ref( &self, ) -> Result<&SendSideDataTooLarge, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the PacketBuildError::SendSideDataTooLarge variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_send_side_data_too_large_mut(
&mut self,
) -> Result<&mut SendSideDataTooLarge, TryUnwrapError<&mut Self>>
pub fn try_unwrap_send_side_data_too_large_mut( &mut self, ) -> Result<&mut SendSideDataTooLarge, TryUnwrapError<&mut Self>>
Attempts to unwrap this mutable reference to the PacketBuildError::SendSideDataTooLarge variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Trait Implementations§
Source§impl Clone for PacketBuildError
impl Clone for PacketBuildError
Source§fn clone(&self) -> PacketBuildError
fn clone(&self) -> PacketBuildError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PacketBuildError
impl Debug for PacketBuildError
Source§impl Display for PacketBuildError
impl Display for PacketBuildError
impl Eq for PacketBuildError
Source§impl Error for PacketBuildError
impl Error for PacketBuildError
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()