Struct mech_core::MechString
source · pub struct MechString { /* private fields */ }Implementations§
source§impl MechString
impl MechString
pub fn new() -> MechString
pub fn from_string(string: String) -> MechString
pub fn from_str(string: &str) -> MechString
pub fn from_chars(chars: &Vec<char>) -> MechString
pub fn len(&self) -> usize
pub fn to_string(&self) -> String
pub fn hash(&self) -> u64
Trait Implementations§
source§impl Clone for MechString
impl Clone for MechString
source§fn clone(&self) -> MechString
fn clone(&self) -> MechString
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 Debug for MechString
impl Debug for MechString
source§impl<'de> Deserialize<'de> for MechString
impl<'de> Deserialize<'de> for MechString
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<MechString> for Value
impl From<MechString> for Value
source§fn from(n: MechString) -> Value
fn from(n: MechString) -> Value
Converts to this type from the input type.
source§impl From<bool> for MechString
impl From<bool> for MechString
source§fn from(n: bool) -> MechString
fn from(n: bool) -> MechString
Converts to this type from the input type.
source§impl PartialEq for MechString
impl PartialEq for MechString
source§fn eq(&self, other: &MechString) -> bool
fn eq(&self, other: &MechString) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for MechString
impl PartialOrd for MechString
source§fn partial_cmp(&self, other: &MechString) -> Option<Ordering>
fn partial_cmp(&self, other: &MechString) -> Option<Ordering>
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 Serialize for MechString
impl Serialize for MechString
impl StructuralPartialEq for MechString
Auto Trait Implementations§
impl Freeze for MechString
impl RefUnwindSafe for MechString
impl Send for MechString
impl Sync for MechString
impl Unpin for MechString
impl UnwindSafe for MechString
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> 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>
Converts
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>
Converts
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 moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.