Enum babycat::Error [−][src]
pub enum Error {}Show variants
FeatureNotCompiled(&'static str), WrongTimeOffset(u64, u64), WrongNumChannels(u32, u32), WrongNumChannelsAndMono, CannotZeroPadWithoutSpecifiedLength, UnknownInputEncoding, UnknownDecodeError, UnknownDecodeErrorWithMessage(&'static str), UnknownEncodeError, ResamplingError, ResamplingErrorWithMessage(&'static str), WrongFrameRate(u32, u32), WrongFrameRateRatio(u32, u32), FilenameIsADirectory(&'static str), FileNotFound(&'static str), UnknownIOError,
Variants
FeatureNotCompiled(&'static str)
Expand description
Raised when you are trying to use a feature at runtime that was not included at compile-time.
For example, you may receive this error if you are trying to resample audio using a method that was not compiled for your target or binding.
Expand description
Raised when DecodeArgs.start_time_milliseconds
or DecodeArgs.end_time_milliseconds
is invalid.
For example, this error is raised if you set the end timestamp to be before the start timestamp.
Expand description
Raised when you wanted to decode more channels than the audio actually had.
Expand description
Raised if you specified DecodeArgs.convert_to_mono
as true
and DecodeArgs.num_channels
as 1.
Setting both parameters is redundant and contradictory. You should either use
DecodeArgs.convert_to_mono
to flatten all channels or DecodeArgs.num_channels
= 1 to select the first channel and discard the rest.
You can set DecodeArgs.num_channels
n > 1
and use DecodeArgs.convert_to_mono
to only flatten those n
channels.
If you need to select channels in some other way, then do not provide either
DecodeArgs.convert_to_mono
or DecodeArgs.num_channels
.
All channels will be decoded and you can decide what to do with them.
Expand description
Raised if you set DecodeArgs.zero_pad_ending
as true
without also specifying DecodeArgs.end_time_milliseconds
.
Expand description
Raised when we were not able to detect the encoded input as decodable audio.
Expand description
Raised when we were not able to decode the given (encoded) audio.
UnknownDecodeErrorWithMessage(&'static str)
Expand description
Raised when we were not able to decode the given (encoded) audio.
Expand description
Raised when we encountered an unknown error when encoding a waveform into a particular format.
Expand description
Raised when we were not able to resample the audio.
ResamplingErrorWithMessage(&'static str)
Expand description
Raised when we cannot resample from the input frame rate to the output frame rate.
Expand description
Raised if you are trying upsample or downsample audio by a factor greater than 256.
FilenameIsADirectory(&'static str)
Expand description
Raised if you asked Babycat to read a file but gave it a path to a directory.
FileNotFound(&'static str)
Expand description
Raised if you asked Babycat to read a file that does not exist.
Expand description
Raised when something else went wrong while doing I/O.
Implementations
impl Error
[src]
impl Error
[src]pub fn error_type(&self) -> String
[src]
Trait Implementations
impl Deserialize<'static> for Error
[src]
impl Deserialize<'static> for Error
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'static>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'static>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Error for Error
[src]
impl Error for Error
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl Copy for Error
[src]
impl StructuralPartialEq for Error
[src]
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<F, T> IntoSample<T> for F where
T: FromSample<F>,
impl<F, T> IntoSample<T> for F where
T: FromSample<F>,
pub fn into_sample(self) -> T
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more