pub enum RError<T>{
NoDataError(T),
DataError(T),
ArithError(T),
OtherError(T),
}
Expand description
Custom RStats Error
Parameter
Variants§
NoDataError(T)
Error indicating that insufficient data has been supplied
DataError(T)
Error indicating that a wrong kind/size of data has been supplied
ArithError(T)
Error indicating an invalid result, such as an attempt at division by zero
OtherError(T)
Other error converted to RError
Trait Implementations§
source§impl<T> Error for RError<T>
impl<T> Error for RError<T>
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()
source§impl From<AccessError> for RError<String>
impl From<AccessError> for RError<String>
Example ‘From’ implementation for converting to RError
source§fn from(e: AccessError) -> Self
fn from(e: AccessError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for RError<T>where
T: Freeze,
impl<T> RefUnwindSafe for RError<T>where
T: RefUnwindSafe,
impl<T> Send for RError<T>where
T: Send,
impl<T> Sync for RError<T>where
T: Sync,
impl<T> Unpin for RError<T>where
T: Unpin,
impl<T> UnwindSafe for RError<T>where
T: UnwindSafe,
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 moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Printing<T> for Twhere
T: Display,
impl<T> Printing<T> for Twhere
T: Display,
source§fn to_str(self) -> String
fn to_str(self) -> String
Method to serialize.
Decorates Vecs with square brackets and tuples with round ones.
Implementation code is in
printing.rs
.source§fn to_plainstr(self) -> String
fn to_plainstr(self) -> String
Method to serialize in minimal form (space separated, no brackets)
Implementation code is in
printing.rs
.