pub struct char7(/* private fields */);
_char7
only.Expand description
A 7-bit unicode scalar, limited to basic latin subset (ASCII).
Option<char7>
is the same size as char7
or char8
(1 byte).
Implementations§
Source§impl char7
impl char7
Sourcepub const fn from_ascii_char(c: AsciiChar) -> char7
Available on crate feature ascii
only.
pub const fn from_ascii_char(c: AsciiChar) -> char7
ascii
only.Converts an AsciiChar
to char7
.
Sourcepub const fn try_from_char8(c: char8) -> Result<char7, DataOverflow> ⓘ
Available on crate feature _char8
only.
pub const fn try_from_char8(c: char8) -> Result<char7, DataOverflow> ⓘ
_char8
only.Tries to convert a char8
to char7
.
§Errors
Returns DataOverflow
if the character can’t fit in 7 bits.
Sourcepub const fn try_from_char16(c: char16) -> Result<char7, DataOverflow> ⓘ
Available on crate feature _char16
only.
pub const fn try_from_char16(c: char16) -> Result<char7, DataOverflow> ⓘ
_char16
only.Tries to convert a char16
to char7
.
§Errors
Returns DataOverflow
if the character can’t fit in 7 bits.
Sourcepub const fn try_from_char(c: char) -> Result<char7, DataOverflow> ⓘ
pub const fn try_from_char(c: char) -> Result<char7, DataOverflow> ⓘ
Tries to convert a char
to char7
.
§Errors
Returns DataOverflow
if the character can’t fit in 7 bits.
Sourcepub const fn to_ascii_char(c: char7) -> AsciiChar
Available on crate feature ascii
only.
pub const fn to_ascii_char(c: char7) -> AsciiChar
ascii
only.Converts a char7
to AsciiChar
.
Sourcepub const fn to_char8(self) -> char8
Available on crate feature _char8
only.
pub const fn to_char8(self) -> char8
_char8
only.Converts this char7
to char8
.
Sourcepub const fn to_char16(self) -> char16
Available on crate feature _char16
only.
pub const fn to_char16(self) -> char16
_char16
only.Converts this char7
to char16
.
Sourcepub const fn to_utf8_bytes(self) -> [u8; 1]
pub const fn to_utf8_bytes(self) -> [u8; 1]
Converts this char7
to an UTF-8 encoded sequence of bytes.
Sourcepub const fn is_noncharacter(self) -> bool
pub const fn is_noncharacter(self) -> bool
Returns true
if this unicode scalar is a noncharacter.
Sourcepub const fn is_character(self) -> bool
pub const fn is_character(self) -> bool
Returns true
if this unicode scalar is an abstract character.
Sourcepub const fn to_ascii_uppercase(self) -> char7
pub const fn to_ascii_uppercase(self) -> char7
Makes a copy of the value in its ASCII upper case equivalent.
ASCII letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’, but non-ASCII letters are unchanged.
Sourcepub const fn to_ascii_lowercase(self) -> char7
pub const fn to_ascii_lowercase(self) -> char7
Makes a copy of the value in its ASCII lower case equivalent.
ASCII letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’, but non-ASCII letters are unchanged.
Trait Implementations§
Source§impl BitSized<7> for char7
impl BitSized<7> for char7
Source§const BIT_SIZE: usize = _
const BIT_SIZE: usize = _
Source§const MIN_BYTE_SIZE: usize = _
const MIN_BYTE_SIZE: usize = _
Source§impl ConstDefault for char7
impl ConstDefault for char7
Source§impl Ord for char7
impl Ord for char7
Source§impl PartialOrd for char7
impl PartialOrd for char7
Source§impl UnicodeScalar for char7
impl UnicodeScalar for char7
Source§fn byte_len(self) -> usize ⓘ
fn byte_len(self) -> usize ⓘ
Source§fn encode_utf8(self, dst: &mut [u8]) -> &mut str ⓘ
fn encode_utf8(self, dst: &mut [u8]) -> &mut str ⓘ
Source§fn to_utf8_bytes(self) -> [u8; 4]
fn to_utf8_bytes(self) -> [u8; 4]
scalar
to an UTF-8 encoded sequence of bytes. Read moreSource§fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16] ⓘ
fn encode_utf16(self, dst: &mut [u16]) -> &mut [u16] ⓘ
Source§fn to_digit(self, radix: u32) -> Option<u32> ⓘ
fn to_digit(self, radix: u32) -> Option<u32> ⓘ
Source§fn to_ascii_uppercase(self) -> Self
fn to_ascii_uppercase(self) -> Self
Source§fn to_ascii_lowercase(self) -> Self
fn to_ascii_lowercase(self) -> Self
Source§fn is_noncharacter(self) -> bool
fn is_noncharacter(self) -> bool
true
if this unicode scalar is a noncharacter.Source§fn is_digit(self, radix: u32) -> bool
fn is_digit(self, radix: u32) -> bool
Source§fn is_control(self) -> bool
fn is_control(self) -> bool
true
if this unicode scalar has the general category for
control codes.Source§fn is_alphabetic(self) -> bool
fn is_alphabetic(self) -> bool
true
if this unicode scalar has the Alphabetic
property.Source§fn is_numeric(self) -> bool
fn is_numeric(self) -> bool
true
if this unicode scalar has one of the general categories
for numbers. Read moreSource§fn is_alphanumeric(self) -> bool
fn is_alphanumeric(self) -> bool
Source§fn is_lowercase(self) -> bool
fn is_lowercase(self) -> bool
true
if this unicode scalar has the Lowercase
property.Source§fn is_uppercase(self) -> bool
fn is_uppercase(self) -> bool
true
if this unicode scalar has the Lowercase
property.Source§fn is_whitespace(self) -> bool
fn is_whitespace(self) -> bool
true
if this unicode scalar has the White_Space
property.Source§fn is_character(self) -> boolwhere
Self: Sized,
fn is_character(self) -> boolwhere
Self: Sized,
true
if this unicode scalar is an abstract character.impl Copy for char7
impl Eq for char7
impl StructuralPartialEq for char7
Auto Trait Implementations§
impl Freeze for char7
impl RefUnwindSafe for char7
impl Send for char7
impl Sync for char7
impl Unpin for char7
impl UnwindSafe for char7
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> ByteSized for T
impl<T> ByteSized for T
Source§const BYTE_ALIGN: usize = _
const BYTE_ALIGN: usize = _
Source§fn byte_align(&self) -> usize ⓘ
fn byte_align(&self) -> usize ⓘ
Source§fn ptr_size_ratio(&self) -> [usize; 2]
fn ptr_size_ratio(&self) -> [usize; 2]
Source§impl<T, R> Chain<R> for Twhere
T: ?Sized,
impl<T, R> Chain<R> for Twhere
T: ?Sized,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> ExtAny for T
impl<T> ExtAny for T
Source§fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
fn as_any_mut(&mut self) -> &mut dyn Anywhere
Self: Sized,
Source§impl<T> ExtMem for Twhere
T: ?Sized,
impl<T> ExtMem for Twhere
T: ?Sized,
Source§const NEEDS_DROP: bool = _
const NEEDS_DROP: bool = _
Source§fn mem_align_of_val(&self) -> usize ⓘ
fn mem_align_of_val(&self) -> usize ⓘ
Source§fn mem_size_of_val(&self) -> usize ⓘ
fn mem_size_of_val(&self) -> usize ⓘ
Source§fn mem_needs_drop(&self) -> bool
fn mem_needs_drop(&self) -> bool
true
if dropping values of this type matters. Read moreSource§fn mem_forget(self)where
Self: Sized,
fn mem_forget(self)where
Self: Sized,
self
without running its destructor. Read moreSource§fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
fn mem_replace(&mut self, other: Self) -> Selfwhere
Self: Sized,
Source§unsafe fn mem_zeroed<T>() -> T
unsafe fn mem_zeroed<T>() -> T
unsafe_layout
only.T
represented by the all-zero byte-pattern. Read moreSource§unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe fn mem_transmute_copy<Src, Dst>(src: &Src) -> Dst
unsafe_layout
only.T
represented by the all-zero byte-pattern. Read moreSource§fn mem_as_bytes(&self) -> &[u8] ⓘ
fn mem_as_bytes(&self) -> &[u8] ⓘ
unsafe_slice
only.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Hook for T
impl<T> Hook for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError> ⓘ
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError> ⓘ
§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out
indicating that a T
is niched.