Struct edn_format::Symbol
source · [−]pub struct Symbol { /* private fields */ }Expand description
A symbol, as described in EDN data model, is an identifier.
Implementations
sourceimpl Symbol
impl Symbol
sourcepub fn from_name(name: &str) -> Symbol
pub fn from_name(name: &str) -> Symbol
Construct a symbol from a name.
There are no safeguards in place for ensuring that the name given would be valid EDN.
sourcepub fn from_namespace_and_name(namespace: &str, name: &str) -> Symbol
pub fn from_namespace_and_name(namespace: &str, name: &str) -> Symbol
Construct a symbol from a namespace and a name.
There are no safeguards in place for ensuring that either the namespace or the name given would be valid EDN.
Trait Implementations
sourceimpl Display for Symbol
impl Display for Symbol
If the namespace and name of the symbol follow the proper rules, displaying a symbol should give valid EDN.
sourceimpl Ord for Symbol
impl Ord for Symbol
sourceimpl PartialOrd<Symbol> for Symbol
impl PartialOrd<Symbol> for Symbol
sourcefn partial_cmp(&self, other: &Symbol) -> Option<Ordering>
fn partial_cmp(&self, other: &Symbol) -> 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 Symbol
impl StructuralEq for Symbol
impl StructuralPartialEq for Symbol
Auto Trait Implementations
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnwindSafe for Symbol
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)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more