pub enum JsonLdVal {
Object(Vec<(String, Range<usize>, Range<usize>, JsonLdVal)>, Range<usize>),
Array(Vec<(JsonLdVal, Range<usize>)>),
Str(String),
Number(String),
Bool(bool),
Null,
Invalid,
}Variants§
Object(Vec<(String, Range<usize>, Range<usize>, JsonLdVal)>, Range<usize>)
Object carries its span so we can pass it as the triple span for nodes.
Each member is (key, key_span, val_span, value) where key_span is
the byte range of the key string token and val_span is the byte range
of the value token/node in the source, enabling accurate predicate and
object source-mapping.
Array(Vec<(JsonLdVal, Range<usize>)>)
Str(String)
Number(String)
Bool(bool)
Null
Invalid
Implementations§
Source§impl JsonLdVal
impl JsonLdVal
Sourcepub fn get(&self, key: &str) -> Option<&JsonLdVal>
pub fn get(&self, key: &str) -> Option<&JsonLdVal>
Look up a key inside an Object, returning the value or None.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JsonLdVal
impl RefUnwindSafe for JsonLdVal
impl Send for JsonLdVal
impl Sync for JsonLdVal
impl Unpin for JsonLdVal
impl UnsafeUnpin for JsonLdVal
impl UnwindSafe for JsonLdVal
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