pub struct ParameterId { /* private fields */ }Expand description
Type-safe parameter identifier with validation
Implementations§
Source§impl ParameterId
impl ParameterId
Sourcepub fn new(name: impl Into<String>) -> Result<ParameterId, ParameterError>
pub fn new(name: impl Into<String>) -> Result<ParameterId, ParameterError>
Create a new ParameterId with validation
§Rules
- Not empty
- Max length MAX_LEN
- Starts with a letter (a-z, A-Z)
- Contains only letters, digits, and underscores
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Convert into a String
Trait Implementations§
Source§impl AsRef<str> for ParameterId
impl AsRef<str> for ParameterId
Source§impl Clone for ParameterId
impl Clone for ParameterId
Source§fn clone(&self) -> ParameterId
fn clone(&self) -> ParameterId
Returns a duplicate of the value. Read more
1.0.0 · 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 ParameterId
impl Debug for ParameterId
Source§impl Display for ParameterId
impl Display for ParameterId
Source§impl FromStr for ParameterId
impl FromStr for ParameterId
Source§type Err = ParameterError
type Err = ParameterError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<ParameterId, <ParameterId as FromStr>::Err>
fn from_str(s: &str) -> Result<ParameterId, <ParameterId as FromStr>::Err>
Parses a string
s to return a value of this type. Read moreSource§impl Hash for ParameterId
impl Hash for ParameterId
Source§impl Ord for ParameterId
impl Ord for ParameterId
Source§fn cmp(&self, other: &ParameterId) -> Ordering
fn cmp(&self, other: &ParameterId) -> Ordering
1.21.0 · 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 ParameterId
impl PartialEq for ParameterId
Source§impl PartialOrd for ParameterId
impl PartialOrd for ParameterId
impl Eq for ParameterId
impl StructuralPartialEq for ParameterId
Auto Trait Implementations§
impl Freeze for ParameterId
impl RefUnwindSafe for ParameterId
impl Send for ParameterId
impl Sync for ParameterId
impl Unpin for ParameterId
impl UnsafeUnpin for ParameterId
impl UnwindSafe for ParameterId
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