pub enum Id {
Keyword(Keyword),
Term(String),
}
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
pub fn is_keyword(&self) -> bool
pub fn is_keyword_like(&self) -> bool
pub fn as_id_ref(&self) -> IdRef<'_>
Trait Implementations§
Source§impl<'a> From<&'a Id> for ExpandableRef<'a>
impl<'a> From<&'a Id> for ExpandableRef<'a>
Source§impl Ord for Id
impl Ord for Id
Source§impl PartialOrd for Id
impl PartialOrd for Id
Source§impl PrecomputeSize for Id
impl PrecomputeSize for Id
Source§impl Print for Id
impl Print for Id
fn fmt_with( &self, f: &mut Formatter<'_>, _options: &Options, _indent: usize, ) -> Result
Source§fn pretty_print(&self) -> Printed<'_, Self>
fn pretty_print(&self) -> Printed<'_, Self>
Print the value with
Options::pretty
options.Source§fn compact_print(&self) -> Printed<'_, Self>
fn compact_print(&self) -> Printed<'_, Self>
Print the value with
Options::compact
options.Source§fn inline_print(&self) -> Printed<'_, Self>
fn inline_print(&self) -> Printed<'_, Self>
Print the value with
Options::inline
options.Source§fn print_with(&self, options: Options) -> Printed<'_, Self>
fn print_with(&self, options: Options) -> Printed<'_, Self>
Print the value with the given options.
Source§impl TryFromJson for Id
impl TryFromJson for Id
type Error = InvalidContext
fn try_from_json(value: Value) -> Result<Self, InvalidContext>
impl Eq for Id
Auto Trait Implementations§
impl Freeze for Id
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<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T> CallHasher for T
impl<T> CallHasher for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.