pub struct Options<I = Index, M = Location<I>, C = Value<M>> {
pub base: Option<I>,
pub compact_arrays: bool,
pub compact_to_relative: bool,
pub expand_context: Option<RemoteDocumentReference<I, M, C>>,
pub ordered: bool,
pub processing_mode: ProcessingMode,
}
Fields
base: Option<I>
The base IRI to use when expanding or compacting the document.
If set, this overrides the input document’s IRI.
compact_arrays: bool
If set to true, the JSON-LD processor replaces arrays with just one element with that element during compaction.
If set to false, all arrays will remain arrays even if they have just one element.
Defaults to true
.
compact_to_relative: bool
Determines if IRIs are compacted relative to the base option or document location when compacting.
Defaults to true
.
expand_context: Option<RemoteDocumentReference<I, M, C>>
A context that is used to initialize the active context when expanding a document.
ordered: bool
If set to true
, certain algorithm processing steps where indicated are
ordered lexicographically.
If false
, order is not considered in processing.
Defaults to false
.
processing_mode: ProcessingMode
Sets the processing mode.
Defaults to ProcessingMode::JsonLd1_1
.
Implementations
sourceimpl<I, M, C> Options<I, M, C>
impl<I, M, C> Options<I, M, C>
pub fn unordered(self) -> Self
pub fn context_processing_options(&self) -> Options
pub fn expansion_options(&self) -> Options
pub fn compaction_options(&self) -> Options
Trait Implementations
Auto Trait Implementations
impl<I, M, C> RefUnwindSafe for Options<I, M, C>where
C: RefUnwindSafe,
I: RefUnwindSafe,
M: RefUnwindSafe,
impl<I, M, C> Send for Options<I, M, C>where
C: Send,
I: Send,
M: Send,
impl<I, M, C> Sync for Options<I, M, C>where
C: Sync,
I: Sync,
M: Sync,
impl<I, M, C> Unpin for Options<I, M, C>where
C: Unpin,
I: Unpin,
M: Unpin,
impl<I, M, C> UnwindSafe for Options<I, M, C>where
C: UnwindSafe,
I: UnwindSafe,
M: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more