Enum json_ld_core::object::FragmentRef
source · pub enum FragmentRef<'a, T, B> {
IndexEntry(&'a str),
IndexKey,
IndexValue(&'a str),
Object(&'a Object<T, B>),
IndexedObject(&'a Indexed<Object<T, B>>),
Node(&'a Node<T, B>),
IndexedNode(&'a IndexedNode<T, B>),
IndexedNodeList(&'a [IndexedNode<T, B>]),
ValueFragment(FragmentRef<'a, T>),
ListFragment(FragmentRef<'a, T, B>),
NodeFragment(FragmentRef<'a, T, B>),
}
Expand description
Object fragment.
Variants§
IndexEntry(&'a str)
“@index” entry.
IndexKey
“@index” entry key.
IndexValue(&'a str)
“@index” entry value.
Object(&'a Object<T, B>)
Object.
IndexedObject(&'a Indexed<Object<T, B>>)
Indexed object.
Node(&'a Node<T, B>)
Node object.
IndexedNode(&'a IndexedNode<T, B>)
Indexed node object.
IndexedNodeList(&'a [IndexedNode<T, B>])
Indexed node list.
ValueFragment(FragmentRef<'a, T>)
Value object fragment.
ListFragment(FragmentRef<'a, T, B>)
List object fragment.
NodeFragment(FragmentRef<'a, T, B>)
Node object fragment.
Implementations§
source§impl<'a, T, B> FragmentRef<'a, T, B>
impl<'a, T, B> FragmentRef<'a, T, B>
pub fn into_ref(self) -> Option<Ref<'a, T, B>>
pub fn into_id(self) -> Option<Id<&'a T, &'a B>>
pub fn as_id(&self) -> Option<Id<&'a T, &'a B>>
pub fn is_json_array(&self) -> bool
pub fn is_json_object(&self) -> bool
pub fn sub_fragments(&self) -> SubFragments<'a, T, B> ⓘ
Auto Trait Implementations§
impl<'a, T, B> Freeze for FragmentRef<'a, T, B>
impl<'a, T, B> RefUnwindSafe for FragmentRef<'a, T, B>where
T: RefUnwindSafe,
B: RefUnwindSafe,
impl<'a, T, B> Send for FragmentRef<'a, T, B>
impl<'a, T, B> Sync for FragmentRef<'a, T, B>
impl<'a, T, B> Unpin for FragmentRef<'a, T, B>
impl<'a, T, B> UnwindSafe for FragmentRef<'a, T, B>where
T: RefUnwindSafe,
B: RefUnwindSafe,
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