pub enum ParamError<T: PartialEq + Debug> {
OutOfBounds {
bounds: (T, T),
value: T,
},
}Expand description
Represents an error with a parameter type.
Currently the only types that can error are LastChecked and
TimeToConnect since they are both bounded values which will
error if the provided value is out of bounds.
Variants§
Implementations§
Source§impl<T: PartialEq + Debug> ParamError<T>
impl<T: PartialEq + Debug> ParamError<T>
pub fn out_of_bounds(value: T, bounds: (T, T)) -> Self
Trait Implementations§
Source§impl<T> Display for ParamError<T>
impl<T> Display for ParamError<T>
Source§impl<T: PartialEq + Debug> Error for ParamError<T>
impl<T: PartialEq + Debug> Error for ParamError<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 + Debug> StructuralPartialEq for ParamError<T>
Auto Trait Implementations§
impl<T> Freeze for ParamError<T>where
T: Freeze,
impl<T> RefUnwindSafe for ParamError<T>where
T: RefUnwindSafe,
impl<T> Send for ParamError<T>where
T: Send,
impl<T> Sync for ParamError<T>where
T: Sync,
impl<T> Unpin for ParamError<T>where
T: Unpin,
impl<T> UnwindSafe for ParamError<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