pub struct Inexact<T> {
pub rounded: T,
pub source: Float128,
}Expand description
A conversion that could not be exact.
Carries the rounded result, so a caller that wants it after all takes it from the error rather than repeating the conversion with a different function and hoping the two agree.
Fields§
§rounded: TWhat the value rounds to in the destination type.
source: Float128What the source was, for a message that names it.
Trait Implementations§
impl<T: Copy> Copy for Inexact<T>
Source§impl<T: Debug> Error for Inexact<T>
impl<T: Debug> Error for Inexact<T>
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()
impl<T: PartialEq> StructuralPartialEq for Inexact<T>
Auto Trait Implementations§
impl<T> Freeze for Inexact<T>where
T: Freeze,
impl<T> RefUnwindSafe for Inexact<T>where
T: RefUnwindSafe,
impl<T> Send for Inexact<T>where
T: Send,
impl<T> Sync for Inexact<T>where
T: Sync,
impl<T> Unpin for Inexact<T>where
T: Unpin,
impl<T> UnsafeUnpin for Inexact<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Inexact<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