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 customJsonLdOptions.- no suffix: uses default options.
Required Methods§
Sourceasync fn async_compare_with(
&self,
other: &Self,
env: impl AsyncJsonLdEnvironment,
options: JsonLdOptions,
) -> JsonLdCompareResult
async fn async_compare_with( &self, other: &Self, env: impl AsyncJsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompareResult
Compare this document against other using the given options.
Sourceasync fn async_expand_with(
&self,
env: impl AsyncJsonLdEnvironment,
options: JsonLdOptions,
) -> JsonLdExpandResult
async fn async_expand_with( &self, env: impl AsyncJsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdExpandResult
Expand the document using the given options.
Sourceasync fn async_compact_with(
&self,
context: RemoteJsonLdContext,
env: impl AsyncJsonLdEnvironment,
options: JsonLdOptions,
) -> JsonLdCompactResult
async fn async_compact_with( &self, context: RemoteJsonLdContext, env: impl AsyncJsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompactResult
Compact the document relative to context using the given options.
Sourceasync fn async_flatten_with(
&self,
context: Option<RemoteJsonLdContext>,
env: impl AsyncJsonLdEnvironment,
options: JsonLdOptions,
) -> JsonLdFlattenResult
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§
Sourcefn compare_with(
&self,
other: &Self,
env: impl JsonLdEnvironment,
options: JsonLdOptions,
) -> JsonLdCompareResult
fn compare_with( &self, other: &Self, env: impl JsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompareResult
Compare this document against other using the given options.
Sourcefn compare(
&self,
other: &Self,
env: impl JsonLdEnvironment,
) -> JsonLdCompareResult
fn compare( &self, other: &Self, env: impl JsonLdEnvironment, ) -> JsonLdCompareResult
Compare this document against other using default options.
Sourceasync fn async_compare(
&self,
other: &Self,
env: impl AsyncJsonLdEnvironment,
) -> JsonLdCompareResult
async fn async_compare( &self, other: &Self, env: impl AsyncJsonLdEnvironment, ) -> JsonLdCompareResult
Compare this document against other using default options.
Sourcefn expand_with(
&self,
env: impl JsonLdEnvironment,
options: JsonLdOptions,
) -> JsonLdExpandResult
fn expand_with( &self, env: impl JsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdExpandResult
Expand the document using the given options.
Sourcefn expand(&self, env: impl JsonLdEnvironment) -> JsonLdExpandResult
fn expand(&self, env: impl JsonLdEnvironment) -> JsonLdExpandResult
Expand the document using default options.
Sourceasync fn async_expand(
&self,
env: impl AsyncJsonLdEnvironment,
) -> JsonLdExpandResult
async fn async_expand( &self, env: impl AsyncJsonLdEnvironment, ) -> JsonLdExpandResult
Expand the document using default options.
Sourcefn compact_with(
&self,
context: RemoteJsonLdContext,
env: impl JsonLdEnvironment,
options: JsonLdOptions,
) -> JsonLdCompactResult
fn compact_with( &self, context: RemoteJsonLdContext, env: impl JsonLdEnvironment, options: JsonLdOptions, ) -> JsonLdCompactResult
Compact the document relative to context using the given options.
Sourcefn compact(
&self,
context: RemoteJsonLdContext,
env: impl JsonLdEnvironment,
) -> JsonLdCompactResult
fn compact( &self, context: RemoteJsonLdContext, env: impl JsonLdEnvironment, ) -> JsonLdCompactResult
Compact the document relative to context using default options.
Sourceasync fn async_compact(
&self,
context: RemoteJsonLdContext,
env: impl AsyncJsonLdEnvironment,
) -> JsonLdCompactResult
async fn async_compact( &self, context: RemoteJsonLdContext, env: impl AsyncJsonLdEnvironment, ) -> JsonLdCompactResult
Compact the document relative to context using default options.
Sourcefn flatten_with(
&self,
context: Option<RemoteJsonLdContext>,
env: impl JsonLdEnvironment,
options: JsonLdOptions,
) -> JsonLdFlattenResult
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.
Sourcefn flatten(
&self,
context: Option<RemoteJsonLdContext>,
env: impl JsonLdEnvironment,
) -> JsonLdFlattenResult
fn flatten( &self, context: Option<RemoteJsonLdContext>, env: impl JsonLdEnvironment, ) -> JsonLdFlattenResult
Flatten the document using default options.
Sourceasync fn async_flatten(
&self,
context: Option<RemoteJsonLdContext>,
env: impl AsyncJsonLdEnvironment,
) -> JsonLdFlattenResult
async fn async_flatten( &self, context: Option<RemoteJsonLdContext>, env: impl AsyncJsonLdEnvironment, ) -> JsonLdFlattenResult
Flatten the document using default options.
Sourcefn to_rdf_with(
&self,
env: impl JsonLdEnvironment,
generator: impl Generator,
options: JsonLdOptions,
) -> JsonLdToRdfResult
fn to_rdf_with( &self, env: impl JsonLdEnvironment, generator: impl Generator, options: JsonLdOptions, ) -> JsonLdToRdfResult
Serialize the document to RDF using the given options.
Sourcefn to_rdf(
&self,
env: impl JsonLdEnvironment,
generator: impl Generator,
) -> JsonLdToRdfResult
fn to_rdf( &self, env: impl JsonLdEnvironment, generator: impl Generator, ) -> JsonLdToRdfResult
Serialize the document to RDF using default options.
Sourceasync fn async_to_rdf_with(
&self,
env: impl AsyncJsonLdEnvironment,
generator: impl Generator,
options: JsonLdOptions,
) -> JsonLdToRdfResult
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.
Sourceasync fn async_to_rdf(
&self,
env: impl AsyncJsonLdEnvironment,
generator: impl Generator,
) -> JsonLdToRdfResult
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".