Enum json_ld_syntax::context::term_definition::IdRef
source · pub enum IdRef<'a> {
Term(&'a str),
Keyword(Keyword),
}
Variants§
Implementations§
source§impl<'a> IdRef<'a>
impl<'a> IdRef<'a>
pub fn as_iri(&self) -> Option<Iri<'a>>
pub fn as_blank_id(&self) -> Option<&'a BlankId>
pub fn as_compact_iri(&self) -> Option<&'a CompactIri>
pub fn as_keyword(&self) -> Option<Keyword>
pub fn as_str(&self) -> &'a str
pub fn is_keyword(&self) -> bool
pub fn is_keyword_like(&self) -> bool
Trait Implementations§
source§impl<'a> From<IdRef<'a>> for ExpandableRef<'a>
impl<'a> From<IdRef<'a>> for ExpandableRef<'a>
source§impl<'a> From<IdRef<'a>> for KeyOrKeywordRef<'a>
impl<'a> From<IdRef<'a>> for KeyOrKeywordRef<'a>
source§impl<'a> PrecomputeSize for IdRef<'a>
impl<'a> PrecomputeSize for IdRef<'a>
source§impl<'a> Print for IdRef<'a>
impl<'a> Print for IdRef<'a>
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.
impl<'a> Copy for IdRef<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for IdRef<'a>
impl<'a> Send for IdRef<'a>
impl<'a> Sync for IdRef<'a>
impl<'a> Unpin for IdRef<'a>
impl<'a> UnwindSafe for IdRef<'a>
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