Enum CharCase

pub enum CharCase

The case of a cased character, as returned by char::case.

Titlecase characters conceptually are composed of an uppercase portion followed by a lowercase portion. The variant discriminants represent this: the most significant bit represents whether the case conceptually starts as uppercase, while the least significant bit represents whether it conceptually ends as uppercase.

Variants

Lower = 0b00

Lowercase. Corresponds to the Lowercase Unicode property.

Title = 0b10

Titlecase. Corresponds to the Titlecase_Letter Unicode general category.

Upper = 0b11

Uppercase. Corresponds to the Uppercase Unicode property.

Trait Implementations

impl Clone for CharCase

fn clone(&self) -> CharCase

impl Copy for CharCase

impl Debug for CharCase

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl Eq for CharCase

fn assert_fields_are_eq(&self)

impl Hash for CharCase

fn hash<__H: Hasher>(&self, state: &mut __H)

impl Ord for CharCase

fn cmp(&self, other: &CharCase) -> Ordering

impl PartialEq for CharCase

fn eq(&self, other: &CharCase) -> bool

impl PartialOrd for CharCase

fn partial_cmp(&self, other: &CharCase) -> Option<Ordering>

impl StructuralPartialEq for CharCase

impl TrivialClone for CharCase

Auto Trait Implementations

impl Freeze for CharCase

impl RefUnwindSafe for CharCase

impl Send for CharCase

impl Sync for CharCase

impl Unpin for CharCase

impl UnsafeUnpin for CharCase

impl UnwindSafe for CharCase

Blanket Implementations

impl<T> Any for CharCase where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for CharCase where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for CharCase where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for CharCase where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for CharCase

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Printable for CharCase where T: Copy + Debug,

impl<T> SizeHint for CharCase where T: ?Sized,

fn lower_bound(&self) -> usize
fn upper_bound(&self) -> Option<usize>

impl<T> SizedTypeProperties for CharCase

impl<T, U> Into<U> for CharCase where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for CharCase where U: Into<T>,

type Error = Infallible;
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto<U> for CharCase where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>