Trait Compact

Source
pub trait Compact<I, B> {
    // Required method
    async fn compact_full<'a, N, L>(
        &'a self,
        vocabulary: &'a mut N,
        context: ProcessedRef<'a, 'a, I, B>,
        loader: &'a L,
        options: Options,
    ) -> Result<Value, Error>
       where N: VocabularyMut<Iri = I, BlankId = B>,
             I: Clone + Hash + Eq,
             B: Clone + Hash + Eq,
             L: Loader;

    // Provided methods
    async fn compact_with<'a, N, L>(
        &'a self,
        vocabulary: &'a mut N,
        context: ProcessedRef<'a, 'a, I, B>,
        loader: &'a L,
    ) -> Result<Value, Error>
       where N: VocabularyMut<Iri = I, BlankId = B>,
             I: Clone + Hash + Eq,
             B: Clone + Hash + Eq,
             L: Loader { ... }
    async fn compact<'a, L>(
        &'a self,
        context: ProcessedRef<'a, 'a, I, B>,
        loader: &'a L,
    ) -> Result<Value, Error>
       where (): VocabularyMut<Iri = I, BlankId = B>,
             I: Clone + Hash + Eq,
             B: Clone + Hash + Eq,
             L: Loader { ... }
}
Expand description

Compaction function.

Required Methods§

Source

async fn compact_full<'a, N, L>( &'a self, vocabulary: &'a mut N, context: ProcessedRef<'a, 'a, I, B>, loader: &'a L, options: Options, ) -> Result<Value, Error>
where N: VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq, B: Clone + Hash + Eq, L: Loader,

Compacts the input document with full options.

Provided Methods§

Source

async fn compact_with<'a, N, L>( &'a self, vocabulary: &'a mut N, context: ProcessedRef<'a, 'a, I, B>, loader: &'a L, ) -> Result<Value, Error>
where N: VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq, B: Clone + Hash + Eq, L: Loader,

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

Source

async fn compact<'a, L>( &'a self, context: ProcessedRef<'a, 'a, I, B>, loader: &'a L, ) -> Result<Value, Error>
where (): VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq, B: Clone + Hash + Eq, L: Loader,

Compacts the input document.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<I, B> Compact<I, B> for Vec<Indexed<Node<I, B>>>

Source§

async fn compact_full<'a, N, L>( &'a self, vocabulary: &'a mut N, context: ProcessedRef<'a, 'a, I, B>, loader: &'a L, options: Options, ) -> Result<Value, Error>
where N: VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq, B: Clone + Hash + Eq, L: Loader,

Implementors§

Source§

impl<I, B> Compact<I, B> for ExpandedDocument<I, B>