Struct aliri_braid_examples::normalized::LowerString [−][src]
#[repr(transparent)]pub struct LowerString(_);
Expand description
A non-empty String
normalized to lowercase
This type maintains an invariant that ensures that a value of this type cannot be constructed that contains invalid data. Data that can be normalized to a valid instance of this type will be.
Because this type does normalization, the type explicitly
does not implement Borrow<str>
,
as doing so would could violate the contract of that trait,
potentially resulting in lost data. If a user of
the crate would like to override this, then they can
explicitly implement the trait.
This type includes an explicit parameter indicating that
the borrowed form of this type should be named LowerStr
.
Implementations
Constructs a new LowerString if it conforms to LowerString
and normalizes the input
Constructs a new LowerString without validation or normalization
Safety
Consumers of this function must ensure that values conform to LowerString
and are in normalized form. Failure to maintain this invariant may lead to undefined behavior.
Unwraps the underlying String
value
Methods from Deref<Target = LowerStr>
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
type Err = <LowerString as Normalizer>::Error
type Err = <LowerString as Normalizer>::Error
The associated error which can be returned from parsing.
type Error = <LowerString as Normalizer>::Error
type Error = <LowerString as Normalizer>::Error
The type returned in the event of a conversion error.
type Error = <LowerString as Normalizer>::Error
type Error = <LowerString as Normalizer>::Error
The type returned in the event of a conversion error.
Auto Trait Implementations
impl RefUnwindSafe for LowerString
impl Send for LowerString
impl Sync for LowerString
impl Unpin for LowerString
impl UnwindSafe for LowerString
Blanket Implementations
Mutably borrows from an owned value. Read more