Trait json_ld::Compact

source ·
pub trait Compact<I, B, M> {
    // Required method
    fn compact_full<N, C, L, 'a>(
        &'a self,
        vocabulary: &'a mut N,
        context: ProcessedRef<'a, 'a, I, B, C, M>,
        loader: &'a mut L,
        options: Options
    ) -> Pin<Box<dyn Future<Output = Result<Meta<Value<M>, M>, Meta<Error<<L as ContextLoader<I, M>>::ContextError>, M>>> + Send + 'a, Global>>
       where L: Loader<I, M> + ContextLoader<I, M> + Send + Sync,
             N: Send + Sync + VocabularyMut<Iri = I, BlankId = B>,
             I: Clone + Hash + Eq + Send + Sync,
             B: Clone + Hash + Eq + Send + Sync,
             M: Clone + Send + Sync,
             C: ProcessMeta<I, B, M>,
             <L as ContextLoader<I, M>>::Context: Into<C>;

    // Provided methods
    fn compact_with<N, C, L, 'a>(
        &'a self,
        vocabulary: &'a mut N,
        context: ProcessedRef<'a, 'a, I, B, C, M>,
        loader: &'a mut L
    ) -> Pin<Box<dyn Future<Output = Result<Meta<Value<M>, M>, Meta<Error<<L as ContextLoader<I, M>>::ContextError>, M>>> + Send + 'a, Global>>
       where L: Loader<I, M> + ContextLoader<I, M> + Send + Sync,
             N: Send + Sync + VocabularyMut<Iri = I, BlankId = B>,
             I: Clone + Hash + Eq + Send + Sync,
             B: Clone + Hash + Eq + Send + Sync,
             M: Clone + Send + Sync,
             C: ProcessMeta<I, B, M>,
             <L as ContextLoader<I, M>>::Context: Into<C> { ... }
    fn compact<C, L, 'a>(
        &'a self,
        context: ProcessedRef<'a, 'a, I, B, C, M>,
        loader: &'a mut L
    ) -> Pin<Box<dyn Future<Output = Result<Meta<Value<M>, M>, Meta<Error<<L as ContextLoader<I, M>>::ContextError>, M>>> + Send + 'a, Global>>
       where L: Loader<I, M> + ContextLoader<I, M> + Send + Sync,
             (): Send + Sync + VocabularyMut<Iri = I, BlankId = B>,
             I: Clone + Hash + Eq + Send + Sync,
             B: Clone + Hash + Eq + Send + Sync,
             M: Clone + Send + Sync,
             C: ProcessMeta<I, B, M>,
             <L as ContextLoader<I, M>>::Context: Into<C> { ... }
}
Expand description

Compaction function.

Required Methods§

source

fn compact_full<N, C, L, 'a>( &'a self, vocabulary: &'a mut N, context: ProcessedRef<'a, 'a, I, B, C, M>, loader: &'a mut L, options: Options ) -> Pin<Box<dyn Future<Output = Result<Meta<Value<M>, M>, Meta<Error<<L as ContextLoader<I, M>>::ContextError>, M>>> + Send + 'a, Global>>where L: Loader<I, M> + ContextLoader<I, M> + Send + Sync, N: Send + Sync + VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq + Send + Sync, B: Clone + Hash + Eq + Send + Sync, M: Clone + Send + Sync, C: ProcessMeta<I, B, M>, <L as ContextLoader<I, M>>::Context: Into<C>,

Compacts the input document with full options.

Provided Methods§

source

fn compact_with<N, C, L, 'a>( &'a self, vocabulary: &'a mut N, context: ProcessedRef<'a, 'a, I, B, C, M>, loader: &'a mut L ) -> Pin<Box<dyn Future<Output = Result<Meta<Value<M>, M>, Meta<Error<<L as ContextLoader<I, M>>::ContextError>, M>>> + Send + 'a, Global>>where L: Loader<I, M> + ContextLoader<I, M> + Send + Sync, N: Send + Sync + VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq + Send + Sync, B: Clone + Hash + Eq + Send + Sync, M: Clone + Send + Sync, C: ProcessMeta<I, B, M>, <L as ContextLoader<I, M>>::Context: Into<C>,

Compacts the input document with the given vocabulary to interpret identifiers.

source

fn compact<C, L, 'a>( &'a self, context: ProcessedRef<'a, 'a, I, B, C, M>, loader: &'a mut L ) -> Pin<Box<dyn Future<Output = Result<Meta<Value<M>, M>, Meta<Error<<L as ContextLoader<I, M>>::ContextError>, M>>> + Send + 'a, Global>>where L: Loader<I, M> + ContextLoader<I, M> + Send + Sync, (): Send + Sync + VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq + Send + Sync, B: Clone + Hash + Eq + Send + Sync, M: Clone + Send + Sync, C: ProcessMeta<I, B, M>, <L as ContextLoader<I, M>>::Context: Into<C>,

Compacts the input document.

Implementations on Foreign Types§

source§

impl<T, I, B, M> Compact<I, B, M> for Meta<T, M>where T: CompactMeta<I, B, M>,

source§

fn compact_full<N, C, L, 'a>( &'a self, vocabulary: &'a mut N, context: ProcessedRef<'a, 'a, I, B, C, M>, loader: &'a mut L, options: Options ) -> Pin<Box<dyn Future<Output = Result<Meta<Value<M>, M>, Meta<Error<<L as ContextLoader<I, M>>::ContextError>, M>>> + Send + 'a, Global>>where L: Loader<I, M> + ContextLoader<I, M> + Send + Sync, N: Send + Sync + VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq + Send + Sync, B: Clone + Hash + Eq + Send + Sync, M: Clone + Send + Sync, C: ProcessMeta<I, B, M>, <L as ContextLoader<I, M>>::Context: Into<C>,

Implementors§