Skip to main content

TryFromJson

Trait TryFromJson 

Source
pub trait TryFromJson<T, B>: Sized {
    // Required method
    fn try_from_json_in(
        vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>,
        value: Value,
    ) -> Result<Self, InvalidExpandedJson>;
}
Expand description

Try to convert from a JSON value directly into an expanded JSON-LD document without going through the expansion algorithm.

The input JSON value must be in expanded JSON-LD form.

Required Methods§

Source

fn try_from_json_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, value: Value, ) -> Result<Self, InvalidExpandedJson>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, B, V> TryFromJson<T, B> for IndexSet<V>
where V: Eq + Hash + TryFromJson<T, B>,

Source§

fn try_from_json_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, value: Value, ) -> Result<IndexSet<V>, InvalidExpandedJson>

Source§

impl<T, B, V> TryFromJson<T, B> for Vec<V>
where V: TryFromJson<T, B>,

Source§

fn try_from_json_in( vocabulary: &mut impl VocabularyMut<Iri = T, BlankId = B>, value: Value, ) -> Result<Vec<V>, InvalidExpandedJson>

Implementors§

Source§

impl<I, B> TryFromJson<I, B> for Id<I, B>

Source§

impl<T, B, O> TryFromJson<T, B> for Indexed<O>
where O: TryFromJsonObject<T, B>,

Source§

impl<T, B> TryFromJson<T, B> for ExpandedDocument<T, B>
where T: Eq + Hash, B: Eq + Hash,

Source§

impl<T, B> TryFromJson<T, B> for Object<T, B>
where T: Eq + Hash, B: Eq + Hash,

Source§

impl<T, B> TryFromJson<T, B> for Properties<T, B>
where T: Eq + Hash, B: Eq + Hash,

Source§

impl<T, B> TryFromJson<T, B> for ReverseProperties<T, B>
where T: Eq + Hash, B: Eq + Hash,