pub struct Symbol { /* private fields */ }Expand description
A symbol, as described in EDN data model, is an identifier.
Implementations§
Source§impl 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§
Source§impl Display for Symbol
If the namespace and name of the symbol follow the proper rules, displaying
a symbol should give valid EDN.
impl Display for Symbol
If the namespace and name of the symbol follow the proper rules, displaying a symbol should give valid EDN.
Source§impl Ord for Symbol
impl Ord for Symbol
Source§impl PartialOrd for Symbol
impl PartialOrd for Symbol
impl Eq for Symbol
impl StructuralPartialEq for Symbol
Auto Trait Implementations§
impl Freeze for Symbol
impl RefUnwindSafe for Symbol
impl Send for Symbol
impl Sync for Symbol
impl Unpin for Symbol
impl UnwindSafe for Symbol
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§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 more