pub struct FixedCodepointString<const N: usize> { /* private fields */ }Available on crate feature
text_fixed only.Expand description
A fixed-length string of exactly N Unicode scalar values (codepoints).
Implementations§
Source§impl<const N: usize> FixedCodepointString<N>
impl<const N: usize> FixedCodepointString<N>
Sourcepub const fn as_chars(&self) -> &[char; N]
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
pub const fn as_chars(&self) -> &[char; N]
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Returns the stored codepoints.
Sourcepub const fn as_str_view(&self) -> FixedCodepointStr<'_, N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
pub const fn as_str_view(&self) -> FixedCodepointStr<'_, N>
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Returns a borrowed view of this fixed-codepoint string.
Sourcepub fn to_string_lossless(&self) -> String
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
pub fn to_string_lossless(&self) -> String
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Builds a String by collecting the stored codepoints.
Trait Implementations§
Source§impl<const N: usize> AsRef<[char]> for FixedCodepointString<N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> AsRef<[char]> for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§impl<const N: usize> Clone for FixedCodepointString<N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> Clone for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§fn clone(&self) -> FixedCodepointString<N>
fn clone(&self) -> FixedCodepointString<N>
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<const N: usize> Debug for FixedCodepointString<N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> Debug for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§impl<const N: usize> Display for FixedCodepointString<N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> Display for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§impl<'a, const N: usize> From<&'a FixedCodepointString<N>> for FixedCodepointStr<'a, N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<'a, const N: usize> From<&'a FixedCodepointString<N>> for FixedCodepointStr<'a, N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§fn from(v: &'a FixedCodepointString<N>) -> Self
fn from(v: &'a FixedCodepointString<N>) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> From<&FixedCodepointString<N>> for String
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> From<&FixedCodepointString<N>> for String
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§fn from(v: &FixedCodepointString<N>) -> Self
fn from(v: &FixedCodepointString<N>) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> From<FixedCodepointStr<'_, N>> for FixedCodepointString<N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> From<FixedCodepointStr<'_, N>> for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§fn from(v: FixedCodepointStr<'_, N>) -> Self
fn from(v: FixedCodepointStr<'_, N>) -> Self
Converts to this type from the input type.
Source§impl<const N: usize> Hash for FixedCodepointString<N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> Hash for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§impl<const N: usize> Ord for FixedCodepointString<N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> Ord for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§fn cmp(&self, other: &FixedCodepointString<N>) -> Ordering
fn cmp(&self, other: &FixedCodepointString<N>) -> 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<const N: usize> PartialEq for FixedCodepointString<N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> PartialEq for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§impl<const N: usize> PartialOrd for FixedCodepointString<N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> PartialOrd for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§impl<const N: usize> TryFrom<&str> for FixedCodepointString<N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> TryFrom<&str> for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Source§impl<const N: usize> TryFrom<String> for FixedCodepointString<N>
Available on crate features text_utf8 or text_utf16 or text_utf32 or text_fixed only.
impl<const N: usize> TryFrom<String> for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.impl<const N: usize> Copy for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.impl<const N: usize> Eq for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.impl<const N: usize> StructuralPartialEq for FixedCodepointString<N>
Available on crate features
text_utf8 or text_utf16 or text_utf32 or text_fixed only.Auto Trait Implementations§
impl<const N: usize> Freeze for FixedCodepointString<N>
impl<const N: usize> RefUnwindSafe for FixedCodepointString<N>
impl<const N: usize> Send for FixedCodepointString<N>
impl<const N: usize> Sync for FixedCodepointString<N>
impl<const N: usize> Unpin for FixedCodepointString<N>
impl<const N: usize> UnwindSafe for FixedCodepointString<N>
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