Skip to main content

CompactFragment

Trait CompactFragment 

Source
pub trait CompactFragment<I, B> {
    // Required method
    async fn compact_fragment_full<'a, N, L>(
        &'a self,
        vocabulary: &'a mut N,
        active_context: &'a Context<I, B>,
        type_scoped_context: &'a Context<I, B>,
        active_property: Option<&'a str>,
        loader: &'a L,
        options: Options,
    ) -> CompactFragmentResult<L::Error>
       where N: VocabularyMut<Iri = I, BlankId = B>,
             I: Clone + Hash + Eq,
             B: Clone + Hash + Eq,
             L: Loader;

    // Provided methods
    async fn compact_fragment_with<'a, N, L>(
        &'a self,
        vocabulary: &'a mut N,
        active_context: &'a Context<I, B>,
        loader: &'a mut L,
    ) -> CompactFragmentResult<L::Error>
       where N: VocabularyMut<Iri = I, BlankId = B>,
             I: Clone + Hash + Eq,
             B: Clone + Hash + Eq,
             L: Loader { ... }
    async fn compact_fragment<'a, L>(
        &'a self,
        active_context: &'a Context<I, B>,
        loader: &'a mut L,
    ) -> CompactFragmentResult<L::Error>
       where (): VocabularyMut<Iri = I, BlankId = B>,
             I: Clone + Hash + Eq,
             B: Clone + Hash + Eq,
             L: Loader { ... }
}
Expand description

Document fragments that can be compacted against an active context.

Required Methods§

Source

async fn compact_fragment_full<'a, N, L>( &'a self, vocabulary: &'a mut N, active_context: &'a Context<I, B>, type_scoped_context: &'a Context<I, B>, active_property: Option<&'a str>, loader: &'a L, options: Options, ) -> CompactFragmentResult<L::Error>
where N: VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq, B: Clone + Hash + Eq, L: Loader,

Compacts this fragment, taking every parameter of the algorithm explicitly.

active_context is the context in force for this fragment. type_scoped_context is the context as it stood before this fragment’s own type-scoped contexts were applied; term definitions for active_property and for @type values are looked up there, as the specification requires. active_property is the term this fragment was reached through, and drives container, language and index handling. loader resolves any remote context referenced by a scoped @context.

Provided Methods§

Source

async fn compact_fragment_with<'a, N, L>( &'a self, vocabulary: &'a mut N, active_context: &'a Context<I, B>, loader: &'a mut L, ) -> CompactFragmentResult<L::Error>
where N: VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq, B: Clone + Hash + Eq, L: Loader,

Compacts this fragment at the top level of a document, with the default Options, using vocabulary to resolve IRI and blank node identifiers.

Source

async fn compact_fragment<'a, L>( &'a self, active_context: &'a Context<I, B>, loader: &'a mut L, ) -> CompactFragmentResult<L::Error>
where (): VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq, B: Clone + Hash + Eq, L: Loader,

Compacts this fragment at the top level of a document, with the default Options, for documents that store IRIs and blank node identifiers inline instead of indexing them through a vocabulary.

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<I, B, T: CompactIndexedFragment<I, B>> CompactFragment<I, B> for Indexed<T>

Source§

async fn compact_fragment_full<'a, N, L>( &'a self, vocabulary: &'a mut N, active_context: &'a Context<I, B>, type_scoped_context: &'a Context<I, B>, active_property: Option<&'a str>, loader: &'a L, options: Options, ) -> CompactFragmentResult<L::Error>
where N: VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq, B: Clone + Hash + Eq, L: Loader,

Source§

impl<T: CompactFragment<I, B>, I, B> CompactFragment<I, B> for IndexSet<T>

Source§

async fn compact_fragment_full<'a, N, L>( &'a self, vocabulary: &'a mut N, active_context: &'a Context<I, B>, type_scoped_context: &'a Context<I, B>, active_property: Option<&'a str>, loader: &'a L, options: Options, ) -> CompactFragmentResult<L::Error>
where N: VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq, B: Clone + Hash + Eq, L: Loader,

Source§

impl<T: CompactFragment<I, B>, I, B> CompactFragment<I, B> for Vec<T>

Source§

async fn compact_fragment_full<'a, N, L>( &'a self, vocabulary: &'a mut N, active_context: &'a Context<I, B>, type_scoped_context: &'a Context<I, B>, active_property: Option<&'a str>, loader: &'a L, options: Options, ) -> CompactFragmentResult<L::Error>
where N: VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq, B: Clone + Hash + Eq, L: Loader,

Source§

impl<T: CompactFragment<I, B>, I, B> CompactFragment<I, B> for [T]

Source§

async fn compact_fragment_full<'a, N, L>( &'a self, vocabulary: &'a mut N, active_context: &'a Context<I, B>, type_scoped_context: &'a Context<I, B>, active_property: Option<&'a str>, loader: &'a L, options: Options, ) -> CompactFragmentResult<L::Error>
where N: VocabularyMut<Iri = I, BlankId = B>, I: Clone + Hash + Eq, B: Clone + Hash + Eq, L: Loader,

Implementors§