pub struct ParameterName(/* private fields */);Expand description
A validated job-parameter name.
Its Debug representation is redacted because parameter metadata is sensitive by default.
Implementations§
Source§impl ParameterName
impl ParameterName
Sourcepub fn new(value: impl Into<String>) -> Result<ParameterName, DomainError>
pub fn new(value: impl Into<String>) -> Result<ParameterName, 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§
Source§impl AsRef<str> for ParameterName
impl AsRef<str> for ParameterName
Source§impl Borrow<str> for ParameterName
impl Borrow<str> for ParameterName
Source§impl Clone for ParameterName
impl Clone for ParameterName
Source§fn clone(&self) -> ParameterName
fn clone(&self) -> ParameterName
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 ParameterName
impl Debug for ParameterName
Source§impl Display for ParameterName
impl Display for ParameterName
impl Eq for ParameterName
Source§impl Hash for ParameterName
impl Hash for ParameterName
Source§impl Ord for ParameterName
impl Ord for ParameterName
Source§fn cmp(&self, other: &ParameterName) -> Ordering
fn cmp(&self, other: &ParameterName) -> 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 ParameterName
impl PartialEq for ParameterName
Source§impl PartialOrd for ParameterName
impl PartialOrd for ParameterName
impl StructuralPartialEq for ParameterName
Source§impl TryFrom<&str> for ParameterName
impl TryFrom<&str> for ParameterName
Source§type Error = DomainError
type Error = DomainError
The type returned in the event of a conversion error.
Source§fn try_from(
value: &str,
) -> Result<ParameterName, <ParameterName as TryFrom<&str>>::Error>
fn try_from( value: &str, ) -> Result<ParameterName, <ParameterName as TryFrom<&str>>::Error>
Performs the conversion.
Source§impl TryFrom<String> for ParameterName
impl TryFrom<String> for ParameterName
Source§type Error = DomainError
type Error = DomainError
The type returned in the event of a conversion error.
Source§fn try_from(
value: String,
) -> Result<ParameterName, <ParameterName as TryFrom<String>>::Error>
fn try_from( value: String, ) -> Result<ParameterName, <ParameterName as TryFrom<String>>::Error>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for ParameterName
impl RefUnwindSafe for ParameterName
impl Send for ParameterName
impl Sync for ParameterName
impl Unpin for ParameterName
impl UnsafeUnpin for ParameterName
impl UnwindSafe for ParameterName
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more