Skip to main content

ResampleError

Enum ResampleError 

Source
pub enum ResampleError {
Show 16 variants Again, SourceChanged(SourceChanged), AfterEof, PlaneCount(PlaneCount), SampleCount(SampleCount), UnsupportedRate(UnsupportedRate), UnsupportedFormat(UnsupportedFormat), UnsupportedLayout(UnsupportedLayout), TooManyPlanes(TooManyPlanes), TimestampOutOfRange(TimestampOutOfRange), ChannelDropped(ChannelDropped), RematrixUnsupported(RematrixUnsupported), TimestampOverflow(TimestampOverflow), Resample(Error), OutputBuffer(OutputBuffer), QueueAlloc,
}
Available on crate feature resample only.
Expand description

Errors from FfmpegResampler.

Variants§

§

Again

No converted frame is ready yet — send more input, or send_eof and drain the tail.

This is the “needs more” signal, carried in the error type exactly as AudioStreamDecoder::receive_frame carries it.

§

SourceChanged(SourceChanged)

A frame arrived whose shape is not the source spec this resampler was built with — the mid-stream refusal.

§

AfterEof

send_frame was called after send_eof. Call flush first to reuse the resampler for another stream.

§

PlaneCount(PlaneCount)

A frame’s planes do not hold what its header claims — too few planes for the format, or a plane shorter than its sample count requires.

§

SampleCount(SampleCount)

A sample count no frame can hold: one whose byte size overflows, or one past the c_int av_frame_get_buffer takes.

§

UnsupportedRate(UnsupportedRate)

One end of the conversion declares a sample rate swr cannot be driven with — zero, or past c_int.

§

UnsupportedFormat(UnsupportedFormat)

One end of the conversion declares no sample format (AV_SAMPLE_FMT_NONE) — the state a codec context is in before its decoder opens.

§

UnsupportedLayout(UnsupportedLayout)

One end of the conversion declares a channel layout this backend will not carry.

§

TooManyPlanes(TooManyPlanes)

A planar spec with more channels than a decoded frame has plane slots.

§

TimestampOutOfRange(TimestampOutOfRange)

A frame’s timestamp does not land on the output timeline.

§

ChannelDropped(ChannelDropped)

The conversion between these two layouts would silently drop a source channel.

§

RematrixUnsupported(RematrixUnsupported)

FFmpeg will not build a mixing matrix between these two layouts at all.

§

TimestampOverflow(TimestampOverflow)

The output timeline would leave i64. Counted timestamps are exact or they are nothing, so this is named rather than saturated.

§

Resample(Error)

The wrapped swresample call reported an error.

§

OutputBuffer(OutputBuffer)

A reference to one of the output frame’s planes could not be taken.

§

QueueAlloc

The queue of converted frames could not be grown to hold one more.

Implementations§

Source§

impl ResampleError

Source

pub const fn is_again(&self) -> bool

Returns true if this value is of type Again. Returns false otherwise

Source

pub const fn is_source_changed(&self) -> bool

Returns true if this value is of type SourceChanged. Returns false otherwise

Source

pub const fn is_after_eof(&self) -> bool

Returns true if this value is of type AfterEof. Returns false otherwise

Source

pub const fn is_plane_count(&self) -> bool

Returns true if this value is of type PlaneCount. Returns false otherwise

Source

pub const fn is_sample_count(&self) -> bool

Returns true if this value is of type SampleCount. Returns false otherwise

Source

pub const fn is_unsupported_rate(&self) -> bool

Returns true if this value is of type UnsupportedRate. Returns false otherwise

Source

pub const fn is_unsupported_format(&self) -> bool

Returns true if this value is of type UnsupportedFormat. Returns false otherwise

Source

pub const fn is_unsupported_layout(&self) -> bool

Returns true if this value is of type UnsupportedLayout. Returns false otherwise

Source

pub const fn is_too_many_planes(&self) -> bool

Returns true if this value is of type TooManyPlanes. Returns false otherwise

Source

pub const fn is_timestamp_out_of_range(&self) -> bool

Returns true if this value is of type TimestampOutOfRange. Returns false otherwise

Source

pub const fn is_channel_dropped(&self) -> bool

Returns true if this value is of type ChannelDropped. Returns false otherwise

Source

pub const fn is_rematrix_unsupported(&self) -> bool

Returns true if this value is of type RematrixUnsupported. Returns false otherwise

Source

pub const fn is_timestamp_overflow(&self) -> bool

Returns true if this value is of type TimestampOverflow. Returns false otherwise

Source

pub const fn is_resample(&self) -> bool

Returns true if this value is of type Resample. Returns false otherwise

Source

pub const fn is_output_buffer(&self) -> bool

Returns true if this value is of type OutputBuffer. Returns false otherwise

Source

pub const fn is_queue_alloc(&self) -> bool

Returns true if this value is of type QueueAlloc. Returns false otherwise

Source§

impl ResampleError

Source

pub fn unwrap_again(self)

Unwraps this value to the ResampleError::Again variant. Panics if this value is of any other type.

Source

pub fn unwrap_again_ref(&self)

Unwraps this reference to the ResampleError::Again variant. Panics if this value is of any other type.

Source

pub fn unwrap_again_mut(&mut self)

Unwraps this mutable reference to the ResampleError::Again variant. Panics if this value is of any other type.

Source

pub fn unwrap_source_changed(self) -> SourceChanged

Unwraps this value to the ResampleError::SourceChanged variant. Panics if this value is of any other type.

Source

pub fn unwrap_source_changed_ref(&self) -> &SourceChanged

Unwraps this reference to the ResampleError::SourceChanged variant. Panics if this value is of any other type.

Source

pub fn unwrap_source_changed_mut(&mut self) -> &mut SourceChanged

Unwraps this mutable reference to the ResampleError::SourceChanged variant. Panics if this value is of any other type.

Source

pub fn unwrap_after_eof(self)

Unwraps this value to the ResampleError::AfterEof variant. Panics if this value is of any other type.

Source

pub fn unwrap_after_eof_ref(&self)

Unwraps this reference to the ResampleError::AfterEof variant. Panics if this value is of any other type.

Source

pub fn unwrap_after_eof_mut(&mut self)

Unwraps this mutable reference to the ResampleError::AfterEof variant. Panics if this value is of any other type.

Source

pub fn unwrap_plane_count(self) -> PlaneCount

Unwraps this value to the ResampleError::PlaneCount variant. Panics if this value is of any other type.

Source

pub fn unwrap_plane_count_ref(&self) -> &PlaneCount

Unwraps this reference to the ResampleError::PlaneCount variant. Panics if this value is of any other type.

Source

pub fn unwrap_plane_count_mut(&mut self) -> &mut PlaneCount

Unwraps this mutable reference to the ResampleError::PlaneCount variant. Panics if this value is of any other type.

Source

pub fn unwrap_sample_count(self) -> SampleCount

Unwraps this value to the ResampleError::SampleCount variant. Panics if this value is of any other type.

Source

pub fn unwrap_sample_count_ref(&self) -> &SampleCount

Unwraps this reference to the ResampleError::SampleCount variant. Panics if this value is of any other type.

Source

pub fn unwrap_sample_count_mut(&mut self) -> &mut SampleCount

Unwraps this mutable reference to the ResampleError::SampleCount variant. Panics if this value is of any other type.

Source

pub fn unwrap_unsupported_rate(self) -> UnsupportedRate

Unwraps this value to the ResampleError::UnsupportedRate variant. Panics if this value is of any other type.

Source

pub fn unwrap_unsupported_rate_ref(&self) -> &UnsupportedRate

Unwraps this reference to the ResampleError::UnsupportedRate variant. Panics if this value is of any other type.

Source

pub fn unwrap_unsupported_rate_mut(&mut self) -> &mut UnsupportedRate

Unwraps this mutable reference to the ResampleError::UnsupportedRate variant. Panics if this value is of any other type.

Source

pub fn unwrap_unsupported_format(self) -> UnsupportedFormat

Unwraps this value to the ResampleError::UnsupportedFormat variant. Panics if this value is of any other type.

Source

pub fn unwrap_unsupported_format_ref(&self) -> &UnsupportedFormat

Unwraps this reference to the ResampleError::UnsupportedFormat variant. Panics if this value is of any other type.

Source

pub fn unwrap_unsupported_format_mut(&mut self) -> &mut UnsupportedFormat

Unwraps this mutable reference to the ResampleError::UnsupportedFormat variant. Panics if this value is of any other type.

Source

pub fn unwrap_unsupported_layout(self) -> UnsupportedLayout

Unwraps this value to the ResampleError::UnsupportedLayout variant. Panics if this value is of any other type.

Source

pub fn unwrap_unsupported_layout_ref(&self) -> &UnsupportedLayout

Unwraps this reference to the ResampleError::UnsupportedLayout variant. Panics if this value is of any other type.

Source

pub fn unwrap_unsupported_layout_mut(&mut self) -> &mut UnsupportedLayout

Unwraps this mutable reference to the ResampleError::UnsupportedLayout variant. Panics if this value is of any other type.

Source

pub fn unwrap_too_many_planes(self) -> TooManyPlanes

Unwraps this value to the ResampleError::TooManyPlanes variant. Panics if this value is of any other type.

Source

pub fn unwrap_too_many_planes_ref(&self) -> &TooManyPlanes

Unwraps this reference to the ResampleError::TooManyPlanes variant. Panics if this value is of any other type.

Source

pub fn unwrap_too_many_planes_mut(&mut self) -> &mut TooManyPlanes

Unwraps this mutable reference to the ResampleError::TooManyPlanes variant. Panics if this value is of any other type.

Source

pub fn unwrap_timestamp_out_of_range(self) -> TimestampOutOfRange

Unwraps this value to the ResampleError::TimestampOutOfRange variant. Panics if this value is of any other type.

Source

pub fn unwrap_timestamp_out_of_range_ref(&self) -> &TimestampOutOfRange

Unwraps this reference to the ResampleError::TimestampOutOfRange variant. Panics if this value is of any other type.

Source

pub fn unwrap_timestamp_out_of_range_mut(&mut self) -> &mut TimestampOutOfRange

Unwraps this mutable reference to the ResampleError::TimestampOutOfRange variant. Panics if this value is of any other type.

Source

pub fn unwrap_channel_dropped(self) -> ChannelDropped

Unwraps this value to the ResampleError::ChannelDropped variant. Panics if this value is of any other type.

Source

pub fn unwrap_channel_dropped_ref(&self) -> &ChannelDropped

Unwraps this reference to the ResampleError::ChannelDropped variant. Panics if this value is of any other type.

Source

pub fn unwrap_channel_dropped_mut(&mut self) -> &mut ChannelDropped

Unwraps this mutable reference to the ResampleError::ChannelDropped variant. Panics if this value is of any other type.

Source

pub fn unwrap_rematrix_unsupported(self) -> RematrixUnsupported

Unwraps this value to the ResampleError::RematrixUnsupported variant. Panics if this value is of any other type.

Source

pub fn unwrap_rematrix_unsupported_ref(&self) -> &RematrixUnsupported

Unwraps this reference to the ResampleError::RematrixUnsupported variant. Panics if this value is of any other type.

Source

pub fn unwrap_rematrix_unsupported_mut(&mut self) -> &mut RematrixUnsupported

Unwraps this mutable reference to the ResampleError::RematrixUnsupported variant. Panics if this value is of any other type.

Source

pub fn unwrap_timestamp_overflow(self) -> TimestampOverflow

Unwraps this value to the ResampleError::TimestampOverflow variant. Panics if this value is of any other type.

Source

pub fn unwrap_timestamp_overflow_ref(&self) -> &TimestampOverflow

Unwraps this reference to the ResampleError::TimestampOverflow variant. Panics if this value is of any other type.

Source

pub fn unwrap_timestamp_overflow_mut(&mut self) -> &mut TimestampOverflow

Unwraps this mutable reference to the ResampleError::TimestampOverflow variant. Panics if this value is of any other type.

Source

pub fn unwrap_resample(self) -> Error

Unwraps this value to the ResampleError::Resample variant. Panics if this value is of any other type.

Source

pub fn unwrap_resample_ref(&self) -> &Error

Unwraps this reference to the ResampleError::Resample variant. Panics if this value is of any other type.

Source

pub fn unwrap_resample_mut(&mut self) -> &mut Error

Unwraps this mutable reference to the ResampleError::Resample variant. Panics if this value is of any other type.

Source

pub fn unwrap_output_buffer(self) -> OutputBuffer

Unwraps this value to the ResampleError::OutputBuffer variant. Panics if this value is of any other type.

Source

pub fn unwrap_output_buffer_ref(&self) -> &OutputBuffer

Unwraps this reference to the ResampleError::OutputBuffer variant. Panics if this value is of any other type.

Source

pub fn unwrap_output_buffer_mut(&mut self) -> &mut OutputBuffer

Unwraps this mutable reference to the ResampleError::OutputBuffer variant. Panics if this value is of any other type.

Source

pub fn unwrap_queue_alloc(self)

Unwraps this value to the ResampleError::QueueAlloc variant. Panics if this value is of any other type.

Source

pub fn unwrap_queue_alloc_ref(&self)

Unwraps this reference to the ResampleError::QueueAlloc variant. Panics if this value is of any other type.

Source

pub fn unwrap_queue_alloc_mut(&mut self)

Unwraps this mutable reference to the ResampleError::QueueAlloc variant. Panics if this value is of any other type.

Source§

impl ResampleError

Source

pub fn try_unwrap_again(self) -> Result<(), TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::Again variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_again_ref(&self) -> Result<(), TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::Again variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_again_mut(&mut self) -> Result<(), TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::Again variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_source_changed( self, ) -> Result<SourceChanged, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::SourceChanged variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_source_changed_ref( &self, ) -> Result<&SourceChanged, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::SourceChanged variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_source_changed_mut( &mut self, ) -> Result<&mut SourceChanged, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::SourceChanged variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_after_eof(self) -> Result<(), TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::AfterEof variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_after_eof_ref(&self) -> Result<(), TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::AfterEof variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_after_eof_mut( &mut self, ) -> Result<(), TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::AfterEof variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_plane_count(self) -> Result<PlaneCount, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::PlaneCount variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_plane_count_ref( &self, ) -> Result<&PlaneCount, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::PlaneCount variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_plane_count_mut( &mut self, ) -> Result<&mut PlaneCount, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::PlaneCount variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_sample_count( self, ) -> Result<SampleCount, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::SampleCount variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_sample_count_ref( &self, ) -> Result<&SampleCount, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::SampleCount variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_sample_count_mut( &mut self, ) -> Result<&mut SampleCount, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::SampleCount variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_unsupported_rate( self, ) -> Result<UnsupportedRate, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::UnsupportedRate variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_unsupported_rate_ref( &self, ) -> Result<&UnsupportedRate, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::UnsupportedRate variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_unsupported_rate_mut( &mut self, ) -> Result<&mut UnsupportedRate, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::UnsupportedRate variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_unsupported_format( self, ) -> Result<UnsupportedFormat, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::UnsupportedFormat variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_unsupported_format_ref( &self, ) -> Result<&UnsupportedFormat, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::UnsupportedFormat variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_unsupported_format_mut( &mut self, ) -> Result<&mut UnsupportedFormat, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::UnsupportedFormat variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_unsupported_layout( self, ) -> Result<UnsupportedLayout, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::UnsupportedLayout variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_unsupported_layout_ref( &self, ) -> Result<&UnsupportedLayout, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::UnsupportedLayout variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_unsupported_layout_mut( &mut self, ) -> Result<&mut UnsupportedLayout, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::UnsupportedLayout variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_too_many_planes( self, ) -> Result<TooManyPlanes, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::TooManyPlanes variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_too_many_planes_ref( &self, ) -> Result<&TooManyPlanes, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::TooManyPlanes variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_too_many_planes_mut( &mut self, ) -> Result<&mut TooManyPlanes, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::TooManyPlanes variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_timestamp_out_of_range( self, ) -> Result<TimestampOutOfRange, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::TimestampOutOfRange variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_timestamp_out_of_range_ref( &self, ) -> Result<&TimestampOutOfRange, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::TimestampOutOfRange variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_timestamp_out_of_range_mut( &mut self, ) -> Result<&mut TimestampOutOfRange, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::TimestampOutOfRange variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_channel_dropped( self, ) -> Result<ChannelDropped, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::ChannelDropped variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_channel_dropped_ref( &self, ) -> Result<&ChannelDropped, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::ChannelDropped variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_channel_dropped_mut( &mut self, ) -> Result<&mut ChannelDropped, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::ChannelDropped variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_rematrix_unsupported( self, ) -> Result<RematrixUnsupported, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::RematrixUnsupported variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_rematrix_unsupported_ref( &self, ) -> Result<&RematrixUnsupported, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::RematrixUnsupported variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_rematrix_unsupported_mut( &mut self, ) -> Result<&mut RematrixUnsupported, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::RematrixUnsupported variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_timestamp_overflow( self, ) -> Result<TimestampOverflow, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::TimestampOverflow variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_timestamp_overflow_ref( &self, ) -> Result<&TimestampOverflow, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::TimestampOverflow variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_timestamp_overflow_mut( &mut self, ) -> Result<&mut TimestampOverflow, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::TimestampOverflow variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_resample(self) -> Result<Error, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::Resample variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_resample_ref(&self) -> Result<&Error, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::Resample variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_resample_mut( &mut self, ) -> Result<&mut Error, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::Resample variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_output_buffer( self, ) -> Result<OutputBuffer, TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::OutputBuffer variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_output_buffer_ref( &self, ) -> Result<&OutputBuffer, TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::OutputBuffer variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_output_buffer_mut( &mut self, ) -> Result<&mut OutputBuffer, TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::OutputBuffer variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_queue_alloc(self) -> Result<(), TryUnwrapError<Self>>

Attempts to unwrap this value to the ResampleError::QueueAlloc variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_queue_alloc_ref(&self) -> Result<(), TryUnwrapError<&Self>>

Attempts to unwrap this reference to the ResampleError::QueueAlloc variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Source

pub fn try_unwrap_queue_alloc_mut( &mut self, ) -> Result<(), TryUnwrapError<&mut Self>>

Attempts to unwrap this mutable reference to the ResampleError::QueueAlloc variant. Returns a [TryUnwrapError] with the original value if this value is of any other type.

Trait Implementations§

Source§

impl Clone for ResampleError

Source§

fn clone(&self) -> ResampleError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ResampleError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ResampleError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ResampleError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for ResampleError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToSmolStr for T
where T: Display + ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more