pub enum GrapeFileError {
UnequalSampleBufferLengths,
NoDelimiter,
TryInto,
IoError(Error),
RonError(Error),
RonSpannedError(SpannedError),
}
Expand description
A nice little error that we can return if things go wrong throughout the process of reading, building, or writing a GrapeFile.
Variants§
UnequalSampleBufferLengths
Returned when trying to build a GrapeFile using GrapeFileBuilder::build() and the sample buffers are of unequal lengths.
NoDelimiter
Returned when trying to read a GrapeFile, but are not able to find the delimiter between the header and sample binary.
TryInto
Returned when somehow we fail to turn four bytes into a f32 when reading.
IoError(Error)
Returned when io fails when reading or writing files.
RonError(Error)
Returned when serialization of the header fails.
RonSpannedError(SpannedError)
Returned when deserialization of the header fails.
Trait Implementations§
source§impl Debug for GrapeFileError
impl Debug for GrapeFileError
source§impl Display for GrapeFileError
impl Display for GrapeFileError
source§impl Error for GrapeFileError
impl Error for GrapeFileError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for GrapeFileError
impl !RefUnwindSafe for GrapeFileError
impl Send for GrapeFileError
impl Sync for GrapeFileError
impl Unpin for GrapeFileError
impl !UnwindSafe for GrapeFileError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [
CompactString
]. Read more