Enum identity_core::common::Context
source · pub enum Context {
Url(Url),
Obj(Object),
}
Expand description
A reference to a JSON-LD context
Variants§
Url(Url)
A JSON-LD context expressed as a Url.
Obj(Object)
A JSON-LD context expressed as a JSON object.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Context
impl<'de> Deserialize<'de> for Context
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
source§impl PartialEq for Context
impl PartialEq for Context
impl Eq for Context
impl StructuralPartialEq for Context
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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> FromJson for Twhere
T: for<'de> Deserialize<'de>,
impl<T> FromJson for Twhere
T: for<'de> Deserialize<'de>,
source§fn from_json(json: &(impl AsRef<str> + ?Sized)) -> Result<Self>
fn from_json(json: &(impl AsRef<str> + ?Sized)) -> Result<Self>
Deserialize
Self
from a string of JSON text.source§fn from_json_slice(json: &(impl AsRef<[u8]> + ?Sized)) -> Result<Self>
fn from_json_slice(json: &(impl AsRef<[u8]> + ?Sized)) -> Result<Self>
Deserialize
Self
from bytes of JSON text.source§fn from_json_value(json: Value) -> Result<Self>
fn from_json_value(json: Value) -> Result<Self>
Deserialize
Self
from a serde_json::Value
.source§impl<T> ToJson for Twhere
T: Serialize,
impl<T> ToJson for Twhere
T: Serialize,
source§fn to_json_value(&self) -> Result<Value>
fn to_json_value(&self) -> Result<Value>
Serialize
self
as a serde_json::Value
.source§fn to_json_pretty(&self) -> Result<String>
fn to_json_pretty(&self) -> Result<String>
Serialize
self
as a pretty-printed string of JSON.