[−][src]Struct json_ld::BlankId
Blank node identifier.
Blank nodes are non-uniquely identified nodes that are local to a JSON-LD document.
{
"@id": "_:node1",
"name": "Local blank node 1",
"knows": {
"name": "Local blank node 2, that needs to refer to local node 1",
"knows": { "@id": "_:node1" }
}
}
This type represent a blank node identifier of the form _:name.
It is used by the Reference type to reference blank and non-blank nodes.
Methods
impl BlankId[src]
pub fn new(name: &str) -> BlankId[src]
Create a new blank identifier from a given name.
The created blank node will be of the form _:name.
pub fn as_str(&self) -> &str[src]
Get the blank identifier as a string.
This includes the _: prefix.
Use BlankId::name to get the suffix part only.
pub fn name(&self) -> &str[src]
Get the name/suffix part of the identifier.
For a blank identifier _:name, this returns a string slice to name.
Trait Implementations
impl AsJson for BlankId[src]
impl Clone for BlankId[src]
impl Debug for BlankId[src]
impl Display for BlankId[src]
impl Eq for BlankId[src]
impl<T: Id> From<BlankId> for Reference<T>[src]
impl<T: Id> From<BlankId> for Term<T>[src]
impl Hash for BlankId[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 PartialEq<BlankId> for BlankId[src]
impl StructuralEq for BlankId[src]
impl StructuralPartialEq for BlankId[src]
impl<'a> TryFrom<&'a str> for BlankId[src]
Auto Trait Implementations
impl RefUnwindSafe for BlankId
impl Send for BlankId
impl Sync for BlankId
impl Unpin for BlankId
impl UnwindSafe for BlankId
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<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>,