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) -> &str

Return 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<T> Any for Reason where T: 'static + ?Sized,

impl<T> Borrow<T> for Reason where T: ?Sized,

impl<T> BorrowMut<T> for Reason where T: ?Sized,

impl<T> CloneToUninit for Reason where T: Clone,

impl<T> From<T> for Reason

impl<T> ToOwned for Reason where T: Clone,

impl<T> ToString for Reason where T: Display + ?Sized,

impl<T, U> Into<U> for Reason where U: From<T>,

impl<T, U> TryFrom<U> for Reason where U: Into<T>,

impl<T, U> TryInto<U> for Reason where U: TryFrom<T>,