pub enum TermDef {
Simple(String),
Detailed(TermDetail),
Null(Value),
}Expand description
Represents a context term mapping:
- as a simple IRI string,
- as a detailed object (
TermDetail) with advanced options, - or explicitly
nullto remove or overwrite a term definition.
The null variant uses serde_json::Value::Null under the hood to allow proper null emission in serialization.
Variants§
Simple(String)
Direct mapping to an IRI (string).
Detailed(TermDetail)
Full-featured definition using advanced JSON-LD keyword fields.
Null(Value)
Explicit null value for term removal or overriding.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TermDef
impl<'de> Deserialize<'de> for TermDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TermDef
impl StructuralPartialEq for TermDef
Auto Trait Implementations§
impl Freeze for TermDef
impl RefUnwindSafe for TermDef
impl Send for TermDef
impl Sync for TermDef
impl Unpin for TermDef
impl UnsafeUnpin for TermDef
impl UnwindSafe for TermDef
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.