pub struct FailureCode(/* private fields */);Expand description
A stable, machine-readable failure code owned by an application or adapter.
Implementations§
Source§impl FailureCode
impl FailureCode
Sourcepub fn new(value: impl Into<String>) -> Result<Self, FailureIdentifierError>
pub fn new(value: impl Into<String>) -> Result<Self, FailureIdentifierError>
Validates and constructs the stable identifier.
§Errors
Returns FailureIdentifierError when the value is empty,
oversized, or outside the lowercase segmented ASCII grammar.
Trait Implementations§
Source§impl AsRef<str> for FailureCode
impl AsRef<str> for FailureCode
Source§impl Borrow<str> for FailureCode
impl Borrow<str> for FailureCode
Source§impl Clone for FailureCode
impl Clone for FailureCode
Source§impl Debug for FailureCode
impl Debug for FailureCode
Source§impl<'de> Deserialize<'de> for FailureCode
impl<'de> Deserialize<'de> for FailureCode
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for FailureCode
impl Display for FailureCode
impl Eq for FailureCode
Source§impl From<FailureCode> for String
impl From<FailureCode> for String
Source§fn from(value: FailureCode) -> Self
fn from(value: FailureCode) -> Self
Converts to this type from the input type.
Source§impl FromStr for FailureCode
impl FromStr for FailureCode
Source§impl Hash for FailureCode
impl Hash for FailureCode
Source§impl JsonSchema for FailureCode
impl JsonSchema for FailureCode
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(_: &mut SchemaGenerator) -> Schema
fn json_schema(_: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for FailureCode
impl Ord for FailureCode
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for FailureCode
impl PartialEq for FailureCode
Source§impl PartialOrd for FailureCode
impl PartialOrd for FailureCode
Source§impl Serialize for FailureCode
impl Serialize for FailureCode
impl StructuralPartialEq for FailureCode
Source§impl TryFrom<&str> for FailureCode
impl TryFrom<&str> for FailureCode
Auto Trait Implementations§
impl Forget for FailureCode
impl Freeze for FailureCode
impl Move for FailureCode
impl RefUnwindSafe for FailureCode
impl Send for FailureCode
impl Sync for FailureCode
impl Unpin for FailureCode
impl UnsafeUnpin for FailureCode
impl UnwindSafe for FailureCode
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