pub trait Compact<I, B> {
// Required method
async fn compact_full<'a, N, L, W>(
&'a self,
vocabulary: &'a mut N,
context: ProcessedRef<'a, 'a, I, B>,
loader: &'a L,
options: Options,
warnings: W,
) -> CompactDocumentResult<L::Error>
where N: VocabularyMut<Iri = I, BlankId = B>,
I: Clone + Hash + Eq,
B: Clone + Hash + Eq,
L: Loader,
W: WarningHandler<N>;
// Provided methods
async fn compact_with<'a, N, L>(
&'a self,
vocabulary: &'a mut N,
context: ProcessedRef<'a, 'a, I, B>,
loader: &'a L,
) -> CompactDocumentResult<L::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,
) -> CompactDocumentResult<L::Error>
where (): VocabularyMut<Iri = I, BlankId = B>,
I: Clone + Hash + Eq,
B: Clone + Hash + Eq,
L: Loader { ... }
}Expand description
Whole documents that can be compacted against a processed @context.
Implemented for ExpandedDocument and FlattenedDocument. Unlike
CompactFragment, these methods take the context in both its processed and
its original form: the processed form drives compaction, and the original form
is embedded into the output as its @context.
Required Methods§
Sourceasync fn compact_full<'a, N, L, W>(
&'a self,
vocabulary: &'a mut N,
context: ProcessedRef<'a, 'a, I, B>,
loader: &'a L,
options: Options,
warnings: W,
) -> CompactDocumentResult<L::Error>where
N: VocabularyMut<Iri = I, BlankId = B>,
I: Clone + Hash + Eq,
B: Clone + Hash + Eq,
L: Loader,
W: WarningHandler<N>,
async fn compact_full<'a, N, L, W>(
&'a self,
vocabulary: &'a mut N,
context: ProcessedRef<'a, 'a, I, B>,
loader: &'a L,
options: Options,
warnings: W,
) -> CompactDocumentResult<L::Error>where
N: VocabularyMut<Iri = I, BlankId = B>,
I: Clone + Hash + Eq,
B: Clone + Hash + Eq,
L: Loader,
W: WarningHandler<N>,
Compacts this document with the given Options.
warnings receives every warning raised while processing the scoped
contexts compaction meets.
Provided Methods§
Sourceasync fn compact_with<'a, N, L>(
&'a self,
vocabulary: &'a mut N,
context: ProcessedRef<'a, 'a, I, B>,
loader: &'a L,
) -> CompactDocumentResult<L::Error>
async fn compact_with<'a, N, L>( &'a self, vocabulary: &'a mut N, context: ProcessedRef<'a, 'a, I, B>, loader: &'a L, ) -> CompactDocumentResult<L::Error>
Compacts this document with the default
Options, using vocabulary to resolve IRI and blank
node identifiers.
Warnings are printed to standard error.
Sourceasync fn compact<'a, L>(
&'a self,
context: ProcessedRef<'a, 'a, I, B>,
loader: &'a L,
) -> CompactDocumentResult<L::Error>
async fn compact<'a, L>( &'a self, context: ProcessedRef<'a, 'a, I, B>, loader: &'a L, ) -> CompactDocumentResult<L::Error>
Compacts this document with the default Options, for
documents that store IRIs and blank node identifiers inline instead of
indexing them through a vocabulary.
Warnings are printed to standard error.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".