pub trait Compact<J: JsonSrc, T: Id> {
    fn compact_full<'a, K: JsonFrom<J>, C: ContextMut<T>, L: Loader, M>(
        &'a self,
        active_context: Inversible<T, &'a C>,
        type_scoped_context: Inversible<T, &'a C>,
        active_property: Option<&'a str>,
        loader: &'a mut L,
        options: Options,
        meta: M
    ) -> BoxFuture<'a, Result<K, Error>>
    where
        J: 'a,
        T: 'a,
        C: Sync + Send,
        C::LocalContext: Send + Sync + From<L::Output>,
        L: Sync + Send,
        M: 'a + Send + Sync + Clone + Fn(Option<&J::MetaData>) -> K::MetaData
; fn compact_with<'a, K: JsonFrom<J>, C: ContextMut<T>, L: Loader, M>(
        &'a self,
        active_context: Inversible<T, &'a C>,
        loader: &'a mut L,
        options: Options,
        meta: M
    ) -> BoxFuture<'a, Result<K, Error>>
    where
        Self: Sync,
        T: 'a + Sync + Send,
        C: Sync + Send,
        C::LocalContext: Send + Sync + From<L::Output>,
        L: Sync + Send,
        M: 'a + Send + Sync + Clone + Fn(Option<&J::MetaData>) -> K::MetaData
, { ... }
fn compact<'a, K: JsonFrom<J>, C: ContextMut<T>, L: Loader, M>(
        &'a self,
        active_context: Inversible<T, &'a C>,
        loader: &'a mut L,
        meta: M
    ) -> BoxFuture<'a, Result<K, Error>>
    where
        Self: Sync,
        T: 'a + Sync + Send,
        C: Sync + Send,
        C::LocalContext: Send + Sync + From<L::Output>,
        L: Sync + Send,
        M: 'a + Send + Sync + Clone + Fn(Option<&J::MetaData>) -> K::MetaData
, { ... } }
Expand description

Type that can be compacted.

Required methods

Compact a JSON-LD document into a K JSON value with the provided type scoped context, active property and options.

Unless you know what you are doing, you will probably prefer to use the compact and compact_with functions.

Provided methods

Compact a JSON-LD document into a K JSON value with the provided options.

This calls compact_full with active_context as type scoped context.

Compact a JSON-LD document into a K JSON value with the default options.

Implementations on Foreign Types

Implementors