pub enum CoerceError {
Overflow,
PrecisionLoss,
NaN,
Zero,
}Expand description
Error type for coercion failures.
Variants§
Overflow
The value cannot fit in the destination range.
PrecisionLoss
The destination type cannot represent this value exactly.
NaN
The input was NaN and destination disallows it.
Zero
Zero is not allowed by the conversion rule.
Trait Implementations§
Source§impl Clone for CoerceError
impl Clone for CoerceError
Source§fn clone(&self) -> CoerceError
fn clone(&self) -> CoerceError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CoerceError
impl Debug for CoerceError
Source§impl Display for CoerceError
impl Display for CoerceError
Source§impl Error for CoerceError
impl Error for CoerceError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<CoerceError> for CoerceErrorKind
impl From<CoerceError> for CoerceErrorKind
Source§fn from(e: CoerceError) -> Self
fn from(e: CoerceError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CoerceError
impl PartialEq for CoerceError
impl Copy for CoerceError
impl Eq for CoerceError
impl StructuralPartialEq for CoerceError
Auto Trait Implementations§
impl Freeze for CoerceError
impl RefUnwindSafe for CoerceError
impl Send for CoerceError
impl Sync for CoerceError
impl Unpin for CoerceError
impl UnsafeUnpin for CoerceError
impl UnwindSafe for CoerceError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> RDisplay for Twhere
T: Display,
impl<T> RDisplay for Twhere
T: Display,
Source§fn as_r_string(&self) -> String
fn as_r_string(&self) -> String
Convert to a user-friendly string.
Source§impl<T> RError for Twhere
T: Error,
impl<T> RError for Twhere
T: Error,
Source§fn error_message(&self) -> String
fn error_message(&self) -> String
Get the error message (Display representation).
Source§fn error_chain(&self) -> Vec<String>
fn error_chain(&self) -> Vec<String>
Get all error messages in the chain, from outermost to innermost.
Source§fn error_chain_length(&self) -> i32
fn error_chain_length(&self) -> i32
Get the number of errors in the chain.