Struct json_ns::TargetContext[][src]

pub struct TargetContext {
    pub rules: Vec<(String, String)>,
}

Structure holding the target context to reword a document to.

An instance of this struct is part of the Processor, which can be modified to provide rules according to which the output will be reworded.

By default, this context is empty, which will result in an output document containing only absolute IRIs.

Fields

Pairs of CURIE prefixes and their respective base IRIs.

For absolute IRIs that are about to be added to the output document, the processor will try to find a matching prefix in this list. If found, a CURIE will be used instead.

This list may also contain an entry with an empty string prefix, which then represents the default namespace of the output document.

Methods

impl TargetContext
[src]

Alias for TargetContext::default().

A short-hand for adding a rule.

Compact an absolute IRI according to this context.

Trait Implementations

impl Clone for TargetContext
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for TargetContext
[src]

Formats the value using the given formatter. Read more

impl Default for TargetContext
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations