pub struct ExitCode(/* private fields */);Expand description
A validated flow- and operator-facing exit code.
Implementations§
Source§impl ExitCode
impl ExitCode
Sourcepub fn new(value: impl Into<String>) -> Result<Self, DomainError>
pub fn new(value: impl Into<String>) -> Result<Self, DomainError>
Validates and constructs the name.
§Errors
Returns DomainError when the value is empty, too long, has
surrounding whitespace, or contains a control character.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Returns the validated value.
Trait Implementations§
impl Eq for ExitCode
Source§impl Ord for ExitCode
impl Ord for ExitCode
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 PartialOrd for ExitCode
impl PartialOrd for ExitCode
impl StructuralPartialEq for ExitCode
Auto Trait Implementations§
impl Freeze for ExitCode
impl RefUnwindSafe for ExitCode
impl Send for ExitCode
impl Sync for ExitCode
impl Unpin for ExitCode
impl UnsafeUnpin for ExitCode
impl UnwindSafe for ExitCode
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