Enum json_ld_syntax::context::term_definition::Id
source · pub enum Id {
Term(String),
Keyword(Keyword),
}
Variants§
Implementations§
source§impl Id
impl Id
pub fn as_iri(&self) -> Option<Iri<'_>>
pub fn as_blank_id(&self) -> Option<&BlankId>
pub fn as_compact_iri(&self) -> Option<&CompactIri>
pub fn as_keyword(&self) -> Option<Keyword>
pub fn as_str(&self) -> &str
pub fn into_string(self) -> String
Trait Implementations§
source§impl<M> IntoJsonMeta<M> for Id
impl<M> IntoJsonMeta<M> for Id
fn into_json_meta(self, meta: M) -> Meta<Value<M>, M>
source§impl Ord for Id
impl Ord for Id
source§impl PartialEq<Id> for Id
impl PartialEq<Id> for Id
source§impl PartialOrd<Id> for Id
impl PartialOrd<Id> for Id
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 StrippedPartialEq<Id> for Id
impl StrippedPartialEq<Id> for Id
fn stripped_eq(&self, other: &Id) -> bool
source§impl<M> TryFromStrippedJson<M> for Id
impl<M> TryFromStrippedJson<M> for Id
fn try_from_stripped_json(value: Value<M>) -> Result<Self, InvalidContext>
impl Eq for Id
Auto Trait Implementations§
impl RefUnwindSafe for Id
impl Send for Id
impl Sync for Id
impl Unpin for Id
impl UnwindSafe for Id
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<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
fn equivalent(&self, key: &K) -> bool
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.