Skip to main content

JsonLdExpand

Trait JsonLdExpand 

Source
pub trait JsonLdExpand {
    // Required methods
    async fn expand(
        &self,
        env: impl AsyncJsonLdEnvironment,
    ) -> Result<JsonLdExpandedDocument, JsonLdLocatedError>;
    async fn expand_with(
        &self,
        env: impl AsyncJsonLdEnvironment,
        active_context: &RawJsonLdProcessedContext,
        options: JsonLdExpansionOptions,
    ) -> Result<JsonLdExpandedDocument, JsonLdLocatedError>;
}
Expand description

Low-level expansion trait.

This provides direct access to the expansion algorithm with full control over the active context and options. For the high-level processor entry point, use JsonLdProcessor::expand_with.

Required Methods§

Source

async fn expand( &self, env: impl AsyncJsonLdEnvironment, ) -> Result<JsonLdExpandedDocument, JsonLdLocatedError>

Expand this document with the default expansion options.

Source

async fn expand_with( &self, env: impl AsyncJsonLdEnvironment, active_context: &RawJsonLdProcessedContext, options: JsonLdExpansionOptions, ) -> Result<JsonLdExpandedDocument, JsonLdLocatedError>

Expand this document with the given expansion options and active context.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§