pub struct StopCode(/* private fields */);Expand description
A validated, nonempty opaque stop classification.
Implementations§
Source§impl StopCode
impl StopCode
Sourcepub fn new(code: String) -> Result<Self, ValidationError>
pub fn new(code: String) -> Result<Self, ValidationError>
Validates an opaque stop code.
§Errors
ValidationError::EmptyStopCode if code has no characters. Core never
interprets the code, so an empty one would tell a consumer only that
something stopped the Run and refuse to say what — which is the one thing
this value exists to carry.
Trait Implementations§
impl Eq for StopCode
impl StructuralPartialEq for StopCode
Auto Trait Implementations§
impl Freeze for StopCode
impl RefUnwindSafe for StopCode
impl Send for StopCode
impl Sync for StopCode
impl Unpin for StopCode
impl UnsafeUnpin for StopCode
impl UnwindSafe for StopCode
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