pub struct ReasonCode(/* private fields */);Expand description
Bounded closed-set machine reason code.
Reason codes are uppercase machine vocabulary rather than operator prose, so audit records contain no free text.
Implementations§
Source§impl ReasonCode
impl ReasonCode
Sourcepub fn new(value: impl Into<String>) -> Result<Self, RequestFieldError>
pub fn new(value: impl Into<String>) -> Result<Self, RequestFieldError>
Validates a bounded closed-charset reference.
§Errors
Returns RequestFieldError when the value is empty, exceeds
its byte bound, or contains a character outside the closed set.
Trait Implementations§
Source§impl Clone for ReasonCode
impl Clone for ReasonCode
Source§fn clone(&self) -> ReasonCode
fn clone(&self) -> ReasonCode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReasonCode
impl Debug for ReasonCode
Source§impl Display for ReasonCode
impl Display for ReasonCode
impl Eq for ReasonCode
Source§impl Hash for ReasonCode
impl Hash for ReasonCode
Source§impl Ord for ReasonCode
impl Ord for ReasonCode
Source§fn cmp(&self, other: &ReasonCode) -> Ordering
fn cmp(&self, other: &ReasonCode) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ReasonCode
impl PartialEq for ReasonCode
Source§impl PartialOrd for ReasonCode
impl PartialOrd for ReasonCode
impl StructuralPartialEq for ReasonCode
Auto Trait Implementations§
impl Freeze for ReasonCode
impl RefUnwindSafe for ReasonCode
impl Send for ReasonCode
impl Sync for ReasonCode
impl Unpin for ReasonCode
impl UnsafeUnpin for ReasonCode
impl UnwindSafe for ReasonCode
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