[−][src]Enum json_ld::Reference
Node reference.
Used to reference a node across a document or to a remote document. It can be an identifier (IRI) or a blank node identifier for local blank nodes.
Variants
Node identifier, essentially an IRI.
Blank(BlankId)
Blank node identifier.
Methods
impl<T: Id> Reference<T>
[src]
pub fn as_str(&self) -> &str
[src]
Get a string representation of the reference.
This will either return a string slice of an IRI, or a blank node identifier.
pub fn as_iri(&self) -> Option<Iri>
[src]
If the renference is a node identifier, returns the node IRI.
Returns None
if it is a blank node reference.
Trait Implementations
impl<T: Id> AsJson for Reference<T>
[src]
impl<T: Clone + Id> Clone for Reference<T>
[src]
impl<T: Debug + Id> Debug for Reference<T>
[src]
impl<T: Id> Display for Reference<T>
[src]
impl<T: Eq + Id> Eq for Reference<T>
[src]
impl<T: Id> From<BlankId> for Reference<T>
[src]
impl<T: Id> From<Reference<T>> for Term<T>
[src]
impl<T: Id> From<T> for Reference<T>
[src]
impl<T: Hash + Id> Hash for Reference<T>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T: PartialEq + Id> PartialEq<Reference<T>> for Reference<T>
[src]
impl<T: Id + PartialEq> PartialEq<T> for Reference<T>
[src]
impl<V: Vocab> PartialEq<V> for Reference<Lexicon<V>>
[src]
impl<T: Id> StructuralEq for Reference<T>
[src]
impl<T: Id> StructuralPartialEq for Reference<T>
[src]
impl<T: Id> TermLike for Reference<T>
[src]
impl<'a, T: Id> ToReference<T> for &'a Reference<T>
[src]
type Reference = &'a Reference<T>
The target type of the convertion, which can be borrowed as a Reference<T>
.
fn to_ref(&self) -> Self::Reference
[src]
impl<T: Id> TryFrom<Term<T>> for Reference<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Reference<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Reference<T> where
T: Send,
T: Send,
impl<T> Sync for Reference<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Reference<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Reference<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToOwned for T
[src]
type Owned = T
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,