pub struct SoftAsciiChar(/* private fields */);
Expand description
a char
wrapper with a “is us-ascii” soft constraint
Implementations§
Source§impl SoftAsciiChar
impl SoftAsciiChar
pub fn from_unchecked(ch: char) -> Self
pub fn from_char_unchecked(ch: char) -> Self
👎Deprecated since 1.0.0: use from_unchecked
pub fn from_char(ch: char) -> Result<Self, FromSourceError<char>>
pub fn is_ascii(self) -> bool
pub fn revalidate_soft_constraint(self) -> Result<Self, char>
Source§impl SoftAsciiChar
impl SoftAsciiChar
pub fn is_digit(self, radix: u32) -> bool
pub fn to_digit(self, radix: u32) -> Option<u32>
pub fn escape_unicode(self) -> EscapeUnicode
pub fn escape_debug(self) -> EscapeDebug
pub fn escape_default(self) -> EscapeDefault
pub fn len_utf8(self) -> usize
pub fn len_utf16(self) -> usize
pub fn encode_utf8(self, dst: &mut [u8]) -> &mut str
pub fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16]
pub fn is_alphabetic(self) -> bool
pub fn is_lowercase(self) -> bool
pub fn is_uppercase(self) -> bool
pub fn is_whitespace(self) -> bool
pub fn is_alphanumeric(self) -> bool
pub fn is_control(self) -> bool
pub fn is_numeric(self) -> bool
pub fn to_lowercase(self) -> ToLowercase
pub fn to_uppercase(self) -> ToUppercase
Trait Implementations§
Source§impl Clone for SoftAsciiChar
impl Clone for SoftAsciiChar
Source§fn clone(&self) -> SoftAsciiChar
fn clone(&self) -> SoftAsciiChar
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 Debug for SoftAsciiChar
impl Debug for SoftAsciiChar
Source§impl Default for SoftAsciiChar
impl Default for SoftAsciiChar
Source§fn default() -> SoftAsciiChar
fn default() -> SoftAsciiChar
Returns the “default value” for a type. Read more
Source§impl Display for SoftAsciiChar
impl Display for SoftAsciiChar
Source§impl<'a> Extend<&'a SoftAsciiChar> for SoftAsciiString
impl<'a> Extend<&'a SoftAsciiChar> for SoftAsciiString
Source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = &'a SoftAsciiChar>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = &'a SoftAsciiChar>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl Extend<SoftAsciiChar> for SoftAsciiString
impl Extend<SoftAsciiChar> for SoftAsciiString
Source§fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = SoftAsciiChar>,
fn extend<I>(&mut self, iter: I)where
I: IntoIterator<Item = SoftAsciiChar>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<'a> FromIterator<&'a SoftAsciiChar> for SoftAsciiString
impl<'a> FromIterator<&'a SoftAsciiChar> for SoftAsciiString
Source§fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = &'a SoftAsciiChar>,
fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = &'a SoftAsciiChar>,
Creates a value from an iterator. Read more
Source§impl FromIterator<SoftAsciiChar> for SoftAsciiString
impl FromIterator<SoftAsciiChar> for SoftAsciiString
Source§fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = SoftAsciiChar>,
fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = SoftAsciiChar>,
Creates a value from an iterator. Read more
Source§impl Hash for SoftAsciiChar
impl Hash for SoftAsciiChar
Source§impl Into<char> for SoftAsciiChar
impl Into<char> for SoftAsciiChar
Source§impl Ord for SoftAsciiChar
impl Ord for SoftAsciiChar
Source§fn cmp(&self, other: &SoftAsciiChar) -> Ordering
fn cmp(&self, other: &SoftAsciiChar) -> 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<SoftAsciiChar> for char
impl PartialEq<SoftAsciiChar> for char
Source§impl PartialEq<char> for SoftAsciiChar
impl PartialEq<char> for SoftAsciiChar
Source§impl PartialEq for SoftAsciiChar
impl PartialEq for SoftAsciiChar
Source§impl PartialOrd for SoftAsciiChar
impl PartialOrd for SoftAsciiChar
impl Copy for SoftAsciiChar
impl Eq for SoftAsciiChar
impl StructuralPartialEq for SoftAsciiChar
Auto Trait Implementations§
impl Freeze for SoftAsciiChar
impl RefUnwindSafe for SoftAsciiChar
impl Send for SoftAsciiChar
impl Sync for SoftAsciiChar
impl Unpin for SoftAsciiChar
impl UnwindSafe for SoftAsciiChar
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