pub struct MString { /* private fields */ }
Expand description
A Modified UTF-8 string, but owned, like String.
Implementations
Methods from Deref<Target = MStr>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn as_bytes(&self) -> &[u8]ⓘNotable traits for &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
pub fn to_str(&self) -> Option<&str>
pub fn is_char_boundary(&self, index: usize) -> bool
pub fn chars(&self) -> Chars<'_>ⓘNotable traits for Chars<'a>impl<'a> Iterator for Chars<'a> type Item = Option<char>;
pub fn chars_lossy(&self) -> CharsLossy<'_>ⓘNotable traits for CharsLossy<'a>impl<'a> Iterator for CharsLossy<'a> type Item = char;
pub fn display(&self) -> Display<'_>
Trait Implementations
sourceimpl Extend<char> for MString
impl Extend<char> for MString
sourcefn extend<I: IntoIterator<Item = char>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = char>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
sourcefn 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.
sourcefn 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
sourceimpl FromIterator<char> for MString
impl FromIterator<char> for MString
sourceimpl Ord for MString
impl Ord for MString
sourceimpl PartialOrd<MString> for MString
impl PartialOrd<MString> for MString
sourcefn partial_cmp(&self, other: &MString) -> Option<Ordering>
fn partial_cmp(&self, other: &MString) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for MString
impl StructuralEq for MString
impl StructuralPartialEq for MString
Auto Trait Implementations
impl RefUnwindSafe for MString
impl Send for MString
impl Sync for MString
impl Unpin for MString
impl UnwindSafe for MString
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<I> Insertable<Class> for I where
I: Insertable<Utf8>,
impl<I> Insertable<Class> for I where
I: Insertable<Utf8>,
sourceimpl<I> Insertable<String> for I where
I: Insertable<Utf8>,
impl<I> Insertable<String> for I where
I: Insertable<Utf8>,
sourceimpl<I> Insertable<Utf8> for I where
I: Into<MString>,
impl<I> Insertable<Utf8> for I where
I: Into<MString>,
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more