pub enum PacketBuildError {
Ffmpeg(Error),
UnknownSideData(UnknownSideData),
SideDataAlloc(SideDataAlloc),
}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§
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.
Implementations§
Source§impl PacketBuildError
impl PacketBuildError
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
Source§impl PacketBuildError
impl PacketBuildError
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.
Source§impl PacketBuildError
impl PacketBuildError
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.
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()