pub struct BoundError<T> { /* private fields */ }
Expand description
An error type representing a value that falls outside the closed unit interval [0, 1]
This type is returned by operations that may produce values outside the unit interval, providing information about how the value exceeds the bounds.
Implementations§
Source§impl<T> BoundError<T>
impl<T> BoundError<T>
Sourcepub const fn kind(&self) -> BoundErrorKind
pub const fn kind(&self) -> BoundErrorKind
The way in which the value is out of bounds.
For more detail, see BoundErrorKind.
Sourcepub fn value(self) -> T
pub fn value(self) -> T
The value that caused the error.
The same one used in the attempted creation of a UnitInterval
.
Trait Implementations§
Source§impl<T: Clone> Clone for BoundError<T>
impl<T: Clone> Clone for BoundError<T>
Source§fn clone(&self) -> BoundError<T>
fn clone(&self) -> BoundError<T>
Returns a copy 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<T: Debug> Debug for BoundError<T>
impl<T: Debug> Debug for BoundError<T>
Source§impl<T: Display> Display for BoundError<T>
impl<T: Display> Display for BoundError<T>
Source§impl<T: Debug + Display> Error for BoundError<T>
impl<T: Debug + Display> Error for BoundError<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()
Source§impl<T: PartialEq> PartialEq for BoundError<T>
impl<T: PartialEq> PartialEq for BoundError<T>
impl<T: Copy> Copy for BoundError<T>
impl<T: Eq> Eq for BoundError<T>
impl<T> StructuralPartialEq for BoundError<T>
Auto Trait Implementations§
impl<T> Freeze for BoundError<T>where
T: Freeze,
impl<T> RefUnwindSafe for BoundError<T>where
T: RefUnwindSafe,
impl<T> Send for BoundError<T>where
T: Send,
impl<T> Sync for BoundError<T>where
T: Sync,
impl<T> Unpin for BoundError<T>where
T: Unpin,
impl<T> UnwindSafe for BoundError<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