pub struct TrimmedNonBlankString(/* private fields */);Expand description
String guaranteed to have at least one non-whitespace character
Implementations§
Source§impl TrimmedNonBlankString
Utility functions that apply to TrimmedNonBlankString but not most StringTypes.
impl TrimmedNonBlankString
Utility functions that apply to TrimmedNonBlankString but not most StringTypes.
Sourcepub fn push(&mut self, ch: char)
pub fn push(&mut self, ch: char)
Appends the given character to the end of this TrimmedNonBlankString if it’s not whitespace.
Sourcepub fn push_str(&mut self, string: &str)
pub fn push_str(&mut self, string: &str)
Appends the given string slice to the end of this TrimmedNonBlankString
Sourcepub fn prepend(&mut self, ch: char)
pub fn prepend(&mut self, ch: char)
Prepends the given character to the beginning of this TrimmedNonBlankString as long as it not
whitespace.
Sourcepub fn prepend_str(&mut self, string: &str)
pub fn prepend_str(&mut self, string: &str)
Prepend the given string slice to the beginning of this TrimmedNonBlankString
Trait Implementations§
Source§impl Clone for TrimmedNonBlankString
impl Clone for TrimmedNonBlankString
Source§fn clone(&self) -> TrimmedNonBlankString
fn clone(&self) -> TrimmedNonBlankString
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 TrimmedNonBlankString
impl Debug for TrimmedNonBlankString
Source§impl Display for TrimmedNonBlankString
impl Display for TrimmedNonBlankString
Source§impl EnsureValid for TrimmedNonBlankString
impl EnsureValid for TrimmedNonBlankString
Source§impl From<TrimmedNonBlankString> for <TrimmedNonBlankString as StringType>::Inner
impl From<TrimmedNonBlankString> for <TrimmedNonBlankString as StringType>::Inner
Source§fn from(
value: TrimmedNonBlankString,
) -> <TrimmedNonBlankString as StringType>::Inner
fn from( value: TrimmedNonBlankString, ) -> <TrimmedNonBlankString as StringType>::Inner
Converts to this type from the input type.
Source§impl From<TrimmedNonBlankString> for NonBlankString
impl From<TrimmedNonBlankString> for NonBlankString
Source§fn from(value: TrimmedNonBlankString) -> Self
fn from(value: TrimmedNonBlankString) -> Self
Converts to this type from the input type.
Source§impl From<TrimmedNonBlankString> for String
impl From<TrimmedNonBlankString> for String
Source§fn from(value: TrimmedNonBlankString) -> String
fn from(value: TrimmedNonBlankString) -> String
Converts to this type from the input type.
Source§impl FromStr for TrimmedNonBlankString
impl FromStr for TrimmedNonBlankString
Source§impl Hash for TrimmedNonBlankString
impl Hash for TrimmedNonBlankString
Source§impl Ord for TrimmedNonBlankString
impl Ord for TrimmedNonBlankString
Source§fn cmp(&self, other: &TrimmedNonBlankString) -> Ordering
fn cmp(&self, other: &TrimmedNonBlankString) -> 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 TrimmedNonBlankString
impl PartialEq for TrimmedNonBlankString
Source§impl PartialOrd for TrimmedNonBlankString
impl PartialOrd for TrimmedNonBlankString
Source§impl StringType for TrimmedNonBlankString
impl StringType for TrimmedNonBlankString
Source§fn as_str(&self) -> &str
fn as_str(&self) -> &str
Return a string slice referencing the StringType inner value.
Source§type Inner = NonEmptyString
type Inner = NonEmptyString
Type of the unnamed field that stores the data for the
StringTypeSource§impl TryFrom<NonEmptyString> for TrimmedNonBlankString
impl TryFrom<NonEmptyString> for TrimmedNonBlankString
Source§type Error = ParseError
type Error = ParseError
The type returned in the event of a conversion error.
Source§impl TryFrom<TrimmedNonBlankString> for DigitString
impl TryFrom<TrimmedNonBlankString> for DigitString
Source§type Error = <DigitString as EnsureValid>::ParseErr
type Error = <DigitString as EnsureValid>::ParseErr
The type returned in the event of a conversion error.
Source§impl TryFrom<TrimmedNonBlankString> for HexString
impl TryFrom<TrimmedNonBlankString> for HexString
Source§impl TryFrom<TrimmedNonBlankString> for LowerHexString
impl TryFrom<TrimmedNonBlankString> for LowerHexString
Source§type Error = <LowerHexString as EnsureValid>::ParseErr
type Error = <LowerHexString as EnsureValid>::ParseErr
The type returned in the event of a conversion error.
Source§impl TryFrom<TrimmedNonBlankString> for NumericString
impl TryFrom<TrimmedNonBlankString> for NumericString
Source§type Error = <NumericString as EnsureValid>::ParseErr
type Error = <NumericString as EnsureValid>::ParseErr
The type returned in the event of a conversion error.
Source§impl TryFrom<TrimmedNonBlankString> for UpperHexString
impl TryFrom<TrimmedNonBlankString> for UpperHexString
Source§type Error = <UpperHexString as EnsureValid>::ParseErr
type Error = <UpperHexString as EnsureValid>::ParseErr
The type returned in the event of a conversion error.
impl Eq for TrimmedNonBlankString
impl StructuralPartialEq for TrimmedNonBlankString
Auto Trait Implementations§
impl Freeze for TrimmedNonBlankString
impl RefUnwindSafe for TrimmedNonBlankString
impl Send for TrimmedNonBlankString
impl Sync for TrimmedNonBlankString
impl Unpin for TrimmedNonBlankString
impl UnwindSafe for TrimmedNonBlankString
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