Skip to main content

JsonLdProcessor

Trait JsonLdProcessor 

Source
pub trait JsonLdProcessor: Sized {
Show 20 methods // Required methods async fn async_compare_with( &self, other: &Self, env: impl AsyncJsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompareResult; async fn async_expand_with( &self, env: impl AsyncJsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdExpandResult; async fn async_compact_with( &self, context: RemoteJsonLdContext, env: impl AsyncJsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompactResult; async fn async_flatten_with( &self, context: Option<RemoteJsonLdContext>, env: impl AsyncJsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdFlattenResult; // Provided methods fn compare_with( &self, other: &Self, env: impl JsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompareResult { ... } fn compare( &self, other: &Self, env: impl JsonLdEnvironment, ) -> JsonLdCompareResult { ... } async fn async_compare( &self, other: &Self, env: impl AsyncJsonLdEnvironment, ) -> JsonLdCompareResult { ... } fn expand_with( &self, env: impl JsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdExpandResult { ... } fn expand(&self, env: impl JsonLdEnvironment) -> JsonLdExpandResult { ... } async fn async_expand( &self, env: impl AsyncJsonLdEnvironment, ) -> JsonLdExpandResult { ... } fn compact_with( &self, context: RemoteJsonLdContext, env: impl JsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompactResult { ... } fn compact( &self, context: RemoteJsonLdContext, env: impl JsonLdEnvironment, ) -> JsonLdCompactResult { ... } async fn async_compact( &self, context: RemoteJsonLdContext, env: impl AsyncJsonLdEnvironment, ) -> JsonLdCompactResult { ... } fn flatten_with( &self, context: Option<RemoteJsonLdContext>, env: impl JsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdFlattenResult { ... } fn flatten( &self, context: Option<RemoteJsonLdContext>, env: impl JsonLdEnvironment, ) -> JsonLdFlattenResult { ... } async fn async_flatten( &self, context: Option<RemoteJsonLdContext>, env: impl AsyncJsonLdEnvironment, ) -> JsonLdFlattenResult { ... } fn to_rdf_with( &self, env: impl JsonLdEnvironment, generator: impl Generator, options: JsonLdOptions, ) -> JsonLdToRdfResult { ... } fn to_rdf( &self, env: impl JsonLdEnvironment, generator: impl Generator, ) -> JsonLdToRdfResult { ... } async fn async_to_rdf_with( &self, env: impl AsyncJsonLdEnvironment, generator: impl Generator, options: JsonLdOptions, ) -> JsonLdToRdfResult { ... } async fn async_to_rdf( &self, env: impl AsyncJsonLdEnvironment, generator: impl Generator, ) -> JsonLdToRdfResult { ... }
}
Expand description

The JsonLdProcessor interface is the high-level programming structure that developers use to access the JSON-LD transformation methods.

It is notably implemented for the JsonLdDocument type.

§Methods naming

Each processing function is declined in two variants:

  • _with: allows passing custom JsonLdOptions.
  • no suffix: uses default options.

Required Methods§

Source

async fn async_compare_with( &self, other: &Self, env: impl AsyncJsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompareResult

Compare this document against other using the given options.

Source

async fn async_expand_with( &self, env: impl AsyncJsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdExpandResult

Expand the document using the given options.

Source

async fn async_compact_with( &self, context: RemoteJsonLdContext, env: impl AsyncJsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompactResult

Compact the document relative to context using the given options.

Source

async fn async_flatten_with( &self, context: Option<RemoteJsonLdContext>, env: impl AsyncJsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdFlattenResult

Flatten the document using the given options.

An optional context can be given to compact the result.

Provided Methods§

Source

fn compare_with( &self, other: &Self, env: impl JsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompareResult

Compare this document against other using the given options.

Source

fn compare( &self, other: &Self, env: impl JsonLdEnvironment, ) -> JsonLdCompareResult

Compare this document against other using default options.

Source

async fn async_compare( &self, other: &Self, env: impl AsyncJsonLdEnvironment, ) -> JsonLdCompareResult

Compare this document against other using default options.

Source

fn expand_with( &self, env: impl JsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdExpandResult

Expand the document using the given options.

Source

fn expand(&self, env: impl JsonLdEnvironment) -> JsonLdExpandResult

Expand the document using default options.

Source

async fn async_expand( &self, env: impl AsyncJsonLdEnvironment, ) -> JsonLdExpandResult

Expand the document using default options.

Source

fn compact_with( &self, context: RemoteJsonLdContext, env: impl JsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompactResult

Compact the document relative to context using the given options.

Source

fn compact( &self, context: RemoteJsonLdContext, env: impl JsonLdEnvironment, ) -> JsonLdCompactResult

Compact the document relative to context using default options.

Source

async fn async_compact( &self, context: RemoteJsonLdContext, env: impl AsyncJsonLdEnvironment, ) -> JsonLdCompactResult

Compact the document relative to context using default options.

Source

fn flatten_with( &self, context: Option<RemoteJsonLdContext>, env: impl JsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdFlattenResult

Flatten the document using the given options.

An optional context can be given to compact the result.

Source

fn flatten( &self, context: Option<RemoteJsonLdContext>, env: impl JsonLdEnvironment, ) -> JsonLdFlattenResult

Flatten the document using default options.

Source

async fn async_flatten( &self, context: Option<RemoteJsonLdContext>, env: impl AsyncJsonLdEnvironment, ) -> JsonLdFlattenResult

Flatten the document using default options.

Source

fn to_rdf_with( &self, env: impl JsonLdEnvironment, generator: impl Generator, options: JsonLdOptions, ) -> JsonLdToRdfResult

Serialize the document to RDF using the given options.

Source

fn to_rdf( &self, env: impl JsonLdEnvironment, generator: impl Generator, ) -> JsonLdToRdfResult

Serialize the document to RDF using default options.

Source

async fn async_to_rdf_with( &self, env: impl AsyncJsonLdEnvironment, generator: impl Generator, options: JsonLdOptions, ) -> JsonLdToRdfResult

Serialize the document to RDF using the given options.

Source

async fn async_to_rdf( &self, env: impl AsyncJsonLdEnvironment, generator: impl Generator, ) -> JsonLdToRdfResult

Serialize the document to RDF using default options.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§