pub struct FeatureName<T: AsRef<str> = String>(T);
Expand description
Verified string newtype
Tuple Fields§
§0: T
Implementations§
Source§impl<T: AsRef<str>> FeatureName<T>
impl<T: AsRef<str>> FeatureName<T>
pub fn into_inner(self) -> T
Source§impl<T: AsRef<str>> FeatureName<T>
impl<T: AsRef<str>> FeatureName<T>
Sourcepub fn new(name: T) -> Result<Self, NameValidationError>
pub fn new(name: T) -> Result<Self, NameValidationError>
Validated feature name
Trait Implementations§
Source§impl<T: Clone + AsRef<str>> Clone for FeatureName<T>
impl<T: Clone + AsRef<str>> Clone for FeatureName<T>
Source§fn clone(&self) -> FeatureName<T>
fn clone(&self) -> FeatureName<T>
Returns a copy 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<'de, T: AsRef<str> + Deserialize<'de>> Deserialize<'de> for FeatureName<T>
impl<'de, T: AsRef<str> + Deserialize<'de>> Deserialize<'de> for FeatureName<T>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> FromStr for FeatureName<String>
impl<'a> FromStr for FeatureName<String>
Source§impl<T: Ord + AsRef<str>> Ord for FeatureName<T>
impl<T: Ord + AsRef<str>> Ord for FeatureName<T>
Source§fn cmp(&self, other: &FeatureName<T>) -> Ordering
fn cmp(&self, other: &FeatureName<T>) -> 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<T: PartialOrd + AsRef<str>> PartialOrd for FeatureName<T>
impl<T: PartialOrd + AsRef<str>> PartialOrd for FeatureName<T>
Source§impl<T> Serialize for FeatureName<T>
impl<T> Serialize for FeatureName<T>
impl<T: Eq + AsRef<str>> Eq for FeatureName<T>
impl<T: AsRef<str>> StructuralPartialEq for FeatureName<T>
Auto Trait Implementations§
impl<T> Freeze for FeatureName<T>where
T: Freeze,
impl<T> RefUnwindSafe for FeatureName<T>where
T: RefUnwindSafe,
impl<T> Send for FeatureName<T>where
T: Send,
impl<T> Sync for FeatureName<T>where
T: Sync,
impl<T> Unpin for FeatureName<T>where
T: Unpin,
impl<T> UnwindSafe for FeatureName<T>where
T: UnwindSafe,
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.