pub struct JobName(/* private fields */);Expand description
A validated logical job-definition name.
Implementations§
Source§impl JobName
impl JobName
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 JobName
Source§impl Ord for JobName
impl Ord for JobName
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 JobName
impl PartialOrd for JobName
impl StructuralPartialEq for JobName
Auto Trait Implementations§
impl Freeze for JobName
impl RefUnwindSafe for JobName
impl Send for JobName
impl Sync for JobName
impl Unpin for JobName
impl UnsafeUnpin for JobName
impl UnwindSafe for JobName
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