pub enum ReferencePolicy {
SelfContained,
FullyInlinedExport,
PreserveRefs,
}Expand description
How final output should handle JSON Schema references.
This is an output concern only. It controls whether file/URL references are resolved into a self-contained schema or preserved literally for consumers that want to manage references themselves.
Variants§
SelfContained
Bundle referenced schemas while retaining reusable local definitions.
FullyInlinedExport
Resolve and inline every reachable reference for export.
PreserveRefs
Preserve references exactly for the downstream consumer.
Implementations§
Source§impl ReferencePolicy
impl ReferencePolicy
Sourcepub fn from_flags(keep_refs: bool, inline_refs: bool) -> Self
pub fn from_flags(keep_refs: bool, inline_refs: bool) -> Self
Resolves mutually exclusive CLI flags into one reference policy.
Trait Implementations§
Source§impl Clone for ReferencePolicy
impl Clone for ReferencePolicy
Source§fn clone(&self) -> ReferencePolicy
fn clone(&self) -> ReferencePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ReferencePolicy
Source§impl Debug for ReferencePolicy
impl Debug for ReferencePolicy
impl Eq for ReferencePolicy
Source§impl PartialEq for ReferencePolicy
impl PartialEq for ReferencePolicy
impl StructuralPartialEq for ReferencePolicy
Auto Trait Implementations§
impl Freeze for ReferencePolicy
impl RefUnwindSafe for ReferencePolicy
impl Send for ReferencePolicy
impl Sync for ReferencePolicy
impl Unpin for ReferencePolicy
impl UnsafeUnpin for ReferencePolicy
impl UnwindSafe for ReferencePolicy
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.