Struct emacs_multibyte::PackedString
source · pub struct PackedString<'a>(/* private fields */);
Implementations§
source§impl<'a> PackedString<'a>
impl<'a> PackedString<'a>
sourcepub const unsafe fn from_bytes(bytes: &'a [u8]) -> Self
pub const unsafe fn from_bytes(bytes: &'a [u8]) -> Self
§Safety
bytes
MUST be a valid multibyte string!
pub const fn as_bytes(&self) -> &'a [u8] ⓘ
pub fn try_from_bytes(bytes: &'a [u8]) -> Result<(Self, usize), DecodeError>
sourcepub const fn from_str(s: &'a str) -> Self
pub const fn from_str(s: &'a str) -> Self
A utf-8-encoded string is always a valid multibyte string, so simply accept it as it is.
pub fn iter_encoded_chars(&self) -> impl Iterator<Item = EncodedChar> + 'a
pub fn iter_uniform_chars(&self) -> impl Iterator<Item = SingleChar> + 'a
Trait Implementations§
source§impl<'a> Clone for PackedString<'a>
impl<'a> Clone for PackedString<'a>
source§fn clone(&self) -> PackedString<'a>
fn clone(&self) -> PackedString<'a>
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<'a> Debug for PackedString<'a>
impl<'a> Debug for PackedString<'a>
source§impl<'a> Display for PackedString<'a>
impl<'a> Display for PackedString<'a>
source§impl<'a> Hash for PackedString<'a>
impl<'a> Hash for PackedString<'a>
source§impl<'a> Ord for PackedString<'a>
impl<'a> Ord for PackedString<'a>
source§fn cmp(&self, other: &PackedString<'a>) -> Ordering
fn cmp(&self, other: &PackedString<'a>) -> 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<'a> PartialEq for PackedString<'a>
impl<'a> PartialEq for PackedString<'a>
source§impl<'a> PartialOrd for PackedString<'a>
impl<'a> PartialOrd for PackedString<'a>
impl<'a> Copy for PackedString<'a>
impl<'a> Eq for PackedString<'a>
impl<'a> StructuralPartialEq for PackedString<'a>
Auto Trait Implementations§
impl<'a> Freeze for PackedString<'a>
impl<'a> RefUnwindSafe for PackedString<'a>
impl<'a> Send for PackedString<'a>
impl<'a> Sync for PackedString<'a>
impl<'a> Unpin for PackedString<'a>
impl<'a> UnwindSafe for PackedString<'a>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)