pub struct MStr<'a> { /* private fields */ }Implementations§
source§impl<'a> MStr<'a>
impl<'a> MStr<'a>
pub const fn new_borrowed(s: &'a str) -> MStr<'a>
pub fn new_owned(s: impl Into<Box<str>>) -> MStr<'a>
pub fn new_cow(s: Cow<'a, str>) -> MStr<'a>
pub const fn as_str(&self) -> &str
pub const fn as_bytes(&self) -> &[u8]
pub fn into_string(self) -> String
pub fn into_boxed(self) -> Box<str>
pub fn into_cow(self) -> Cow<'a, str>
pub const fn is_owned(&self) -> bool
pub const fn is_borrowed(&self) -> bool
pub const fn len(&self) -> usize
pub const fn is_empty(&self) -> bool
pub const fn as_ptr(&self) -> *const u8
pub const fn as_str_ptr(&self) -> *const str
Trait Implementations§
source§impl Ord for MStr<'_>
impl Ord for MStr<'_>
source§impl PartialEq<&str> for MStr<'_>
impl PartialEq<&str> for MStr<'_>
source§impl PartialEq<MStr<'_>> for &str
impl PartialEq<MStr<'_>> for &str
source§impl PartialEq<MStr<'_>> for str
impl PartialEq<MStr<'_>> for str
source§impl PartialEq for MStr<'_>
impl PartialEq for MStr<'_>
source§impl PartialOrd<MStr<'_>> for str
impl PartialOrd<MStr<'_>> for str
1.0.0 · source§fn 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 moresource§impl PartialOrd<str> for MStr<'_>
impl PartialOrd<str> for MStr<'_>
1.0.0 · source§fn 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 moresource§impl PartialOrd for MStr<'_>
impl PartialOrd for MStr<'_>
1.0.0 · source§fn 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 moreimpl Eq for MStr<'_>
impl Send for MStr<'_>
impl Sync for MStr<'_>
Auto Trait Implementations§
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