Struct json_ld_syntax::context::definition::Key
source · pub struct Key(/* private fields */);
Expand description
Context key.
Implementations§
source§impl Key
impl Key
pub fn as_iri(&self) -> Option<&Iri>
pub fn as_compact_iri(&self) -> Option<&CompactIri>
pub fn as_blank_id(&self) -> Option<&BlankId>
pub fn as_str(&self) -> &str
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn into_string(self) -> String
pub fn is_keyword_like(&self) -> bool
Trait Implementations§
source§impl<'a> From<&'a Key> for KeyOrKeywordRef<'a>
impl<'a> From<&'a Key> for KeyOrKeywordRef<'a>
source§impl Ord for Key
impl Ord for Key
source§impl PartialOrd for Key
impl PartialOrd for Key
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 PrecomputeSize for Key
impl PrecomputeSize for Key
source§impl Print for Key
impl Print for Key
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 Key
impl TryFromJson for Key
type Error = InvalidContext
fn try_from_json(value: Value) -> Result<Self, Self::Error>
impl Eq for Key
impl StructuralPartialEq for Key
Auto Trait Implementations§
impl Freeze for Key
impl RefUnwindSafe for Key
impl Send for Key
impl Sync for Key
impl Unpin for Key
impl UnwindSafe for Key
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<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.