Struct wolfram_expr::symbol::SymbolRef
source · [−]pub struct SymbolRef<'s>(_);
Expand description
Borrowed string containing a valid symbol.
Implementations
sourceimpl<'s> SymbolRef<'s>
impl<'s> SymbolRef<'s>
sourcepub fn try_new(string: &'s str) -> Option<Self>
pub fn try_new(string: &'s str) -> Option<Self>
Attempt to parse string
as an absolute symbol.
Examples
use wolfram_expr::symbol::SymbolRef;
assert!(matches!(SymbolRef::try_new("System`List"), Some(_)));
assert!(matches!(SymbolRef::try_new("List"), None));
assert!(matches!(SymbolRef::try_new("123"), None));
Trait Implementations
sourceimpl<'s> Ord for SymbolRef<'s>
impl<'s> Ord for SymbolRef<'s>
sourceimpl<'s> PartialOrd<SymbolRef<'s>> for SymbolRef<'s>
impl<'s> PartialOrd<SymbolRef<'s>> for SymbolRef<'s>
sourcefn partial_cmp(&self, other: &SymbolRef<'s>) -> Option<Ordering>
fn partial_cmp(&self, other: &SymbolRef<'s>) -> 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<'s> Copy for SymbolRef<'s>
impl<'s> Eq for SymbolRef<'s>
impl<'s> StructuralEq for SymbolRef<'s>
impl<'s> StructuralPartialEq for SymbolRef<'s>
Auto Trait Implementations
impl<'s> RefUnwindSafe for SymbolRef<'s>
impl<'s> Send for SymbolRef<'s>
impl<'s> Sync for SymbolRef<'s>
impl<'s> Unpin for SymbolRef<'s>
impl<'s> UnwindSafe for SymbolRef<'s>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub 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