pub struct CanonicalString(/* private fields */);Expand description
Exact bounded UTF-8 text for a canonical value.
Implementations§
Source§impl CanonicalString
impl CanonicalString
Sourcepub fn new(value: impl Into<String>) -> Result<Self, ValueError>
pub fn new(value: impl Into<String>) -> Result<Self, ValueError>
Validates and constructs exact UTF-8 text without normalization.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the wrapper and returns the owned UTF-8 string.
Trait Implementations§
Source§impl Clone for CanonicalString
impl Clone for CanonicalString
Source§impl Debug for CanonicalString
impl Debug for CanonicalString
impl Eq for CanonicalString
Source§impl Hash for CanonicalString
impl Hash for CanonicalString
Source§impl Ord for CanonicalString
impl Ord for CanonicalString
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for CanonicalString
impl PartialEq for CanonicalString
Source§impl PartialOrd for CanonicalString
impl PartialOrd for CanonicalString
impl StructuralPartialEq for CanonicalString
Auto Trait Implementations§
impl Freeze for CanonicalString
impl RefUnwindSafe for CanonicalString
impl Send for CanonicalString
impl Sync for CanonicalString
impl Unpin for CanonicalString
impl UnsafeUnpin for CanonicalString
impl UnwindSafe for CanonicalString
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