Struct Reason
pub struct Reason(/* private field */);
The reason for why something, such as a generated value, was rejected.
Currently this is merely a wrapper around a message, but more properties may be added in the future.
This is constructed via .into() on a String, &'static str, or
Box<str>.
Implementations
impl Reason
fn message(&self) -> &strReturn the message for this
Reason.The message is intended for human consumption, and is not guaranteed to have any format in particular.
Trait Implementations
impl Clone for Reason
fn clone(&self) -> Self
impl Debug for Reason
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for Reason
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for Reason
impl From<&'static str> for Reason
fn from(s: &'static str) -> Self
impl From<Box<str>> for Reason
fn from(s: Box<str>) -> Self
impl From<String> for Reason
fn from(s: String) -> Self
impl Hash for Reason
fn hash<__H: Hasher>(&self, state: &mut __H)
impl Ord for Reason
fn cmp(&self, other: &Self) -> Ordering
impl PartialEq for Reason
fn eq(&self, other: &Self) -> bool
impl PartialOrd for Reason
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
impl StructuralPartialEq for Reason
Auto Trait Implementations
impl Freeze for Reason
impl RefUnwindSafe for Reason
impl Send for Reason
impl Sync for Reason
impl Unpin for Reason
impl UnsafeUnpin for Reason
impl UnwindSafe for Reason
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for Reason
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for Reason
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for Reason
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for Reason
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for Reason
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for Reason
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for Reason
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Read<Exclusive, BecauseExclusive> for Reason
where
T: ?Sized,
impl<T> ToOwned for Reason
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T> ToString for Reason
where
T: Display + ?Sized,
fn to_string(&self) -> String
impl<T, U> Into<U> for Reason
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for Reason
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for Reason
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<V, T> VZip<V> for Reason
where
V: MultiLane<T>,
fn vzip(self) -> V