Struct edn_format::Keyword
source · [−]pub struct Keyword { /* private fields */ }Expand description
A keyword, as described in EDN data model, is identifier which should “designate itself”.
Implementations
sourceimpl Keyword
impl Keyword
sourcepub fn from_name(name: &str) -> Keyword
pub fn from_name(name: &str) -> Keyword
Construct a keyword 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) -> Keyword
pub fn from_namespace_and_name(namespace: &str, name: &str) -> Keyword
Construct a keyword 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 Keyword
impl Display for Keyword
If the namespace and name of the symbol follow the proper rules, displaying a keyword should give valid EDN.
sourceimpl Ord for Keyword
impl Ord for Keyword
sourceimpl PartialOrd<Keyword> for Keyword
impl PartialOrd<Keyword> for Keyword
sourcefn partial_cmp(&self, other: &Keyword) -> Option<Ordering>
fn partial_cmp(&self, other: &Keyword) -> 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 Keyword
impl StructuralEq for Keyword
impl StructuralPartialEq for Keyword
Auto Trait Implementations
impl RefUnwindSafe for Keyword
impl Send for Keyword
impl Sync for Keyword
impl Unpin for Keyword
impl UnwindSafe for Keyword
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