pub struct ProviderName(/* private fields */);Expand description
Stable provider id or alias accepted by a registry.
Provider names are normalized by trimming surrounding whitespace and folding
ASCII letters to lowercase. Valid names may contain ASCII letters, digits,
., _, and -.
Implementations§
Source§impl ProviderName
impl ProviderName
Sourcepub fn new(name: &str) -> Result<Self, ProviderRegistryError>
pub fn new(name: &str) -> Result<Self, ProviderRegistryError>
Creates a normalized provider name.
§Parameters
name: Raw provider id, alias, or selector.
§Returns
Normalized provider name.
§Errors
Returns ProviderRegistryError::EmptyProviderName when name is empty
after trimming. Returns ProviderRegistryError::InvalidProviderName
when name is non-ASCII or contains unsupported characters.
Trait Implementations§
Source§impl AsRef<str> for ProviderName
impl AsRef<str> for ProviderName
Source§impl Clone for ProviderName
impl Clone for ProviderName
Source§fn clone(&self) -> ProviderName
fn clone(&self) -> ProviderName
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 ProviderName
impl Debug for ProviderName
Source§impl Display for ProviderName
impl Display for ProviderName
Source§impl FromStr for ProviderName
impl FromStr for ProviderName
Source§impl Hash for ProviderName
impl Hash for ProviderName
Source§impl Ord for ProviderName
impl Ord for ProviderName
Source§fn cmp(&self, other: &ProviderName) -> Ordering
fn cmp(&self, other: &ProviderName) -> 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 ProviderName
impl PartialEq for ProviderName
Source§fn eq(&self, other: &ProviderName) -> bool
fn eq(&self, other: &ProviderName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ProviderName
impl PartialOrd for ProviderName
impl Eq for ProviderName
impl StructuralPartialEq for ProviderName
Auto Trait Implementations§
impl Freeze for ProviderName
impl RefUnwindSafe for ProviderName
impl Send for ProviderName
impl Sync for ProviderName
impl Unpin for ProviderName
impl UnsafeUnpin for ProviderName
impl UnwindSafe for ProviderName
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