pub struct Options {
pub processing_mode: ProcessingMode,
pub compact_to_relative: bool,
pub compact_arrays: bool,
pub ordered: bool,
}Expand description
Compaction options.
Fields§
§processing_mode: ProcessingModeJSON-LD processing mode.
compact_to_relative: boolWhether IRIs may be compacted into references relative to the document’s location.
The compaction algorithm itself does not read this flag: it relativizes
IRIs whenever the active context has a base IRI. The flag is what
decides whether that base IRI gets set in the first place — the
jsonld processor seeds the active context with the input document’s
URL only when this is true and no explicit base IRI was given.
compact_arrays: boolWhether a single-element array is replaced by that element.
When false, arrays stay arrays even with one element. Terms whose
container mapping includes @set, and the @graph and @list keys,
keep their arrays regardless.
ordered: boolWhether the entries of each node object are processed in lexicographic order of their expanded property IRI.
Only affects the order of keys in the output, not which keys appear.
Trait Implementations§
impl Copy for Options
impl Eq for Options
impl StructuralPartialEq for Options
Auto Trait Implementations§
impl Freeze for Options
impl RefUnwindSafe for Options
impl Send for Options
impl Sync for Options
impl Unpin for Options
impl UnsafeUnpin for Options
impl UnwindSafe for Options
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
Source§fn as_unordered(&self) -> &Unordered<T>
fn as_unordered(&self) -> &Unordered<T>
Unordered reference.impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
self is equivalent to key.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.