pub struct LoadOptions {
pub legacy_mode: bool,
pub strict_unknown_fields: bool,
pub deny_ineffective_assertions: bool,
}Expand description
What a caller wants the loader to refuse, rather than merely parse.
Each field is a separate axis on purpose. strict_unknown_fields and
deny_ineffective_assertions refuse different things — a key the schema does not know versus an
assertion that no trace could ever fail — and folding them into one flag would mean a caller who
wanted one silently acquired the other.
Fields§
§legacy_mode: boolTreat a v0 config as v0 rather than trusting its declared version.
strict_unknown_fields: boolRefuse a config carrying keys this version does not understand.
deny_ineffective_assertions: boolRefuse a config whose assertions: include one that cannot fail.
Opt-in, and deliberately not on by default: assay validate has reported these as a
warning since #1983, and turning that into a load-time error for every caller at once would
break suites that are running today. The phased route in #1949 is warning, then opt-in here,
then default at a major after an announced window.
Trait Implementations§
Source§impl Clone for LoadOptions
impl Clone for LoadOptions
Source§fn clone(&self) -> LoadOptions
fn clone(&self) -> LoadOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LoadOptions
Source§impl Debug for LoadOptions
impl Debug for LoadOptions
Source§impl Default for LoadOptions
impl Default for LoadOptions
Source§fn default() -> LoadOptions
fn default() -> LoadOptions
Auto Trait Implementations§
impl Freeze for LoadOptions
impl RefUnwindSafe for LoadOptions
impl Send for LoadOptions
impl Sync for LoadOptions
impl Unpin for LoadOptions
impl UnsafeUnpin for LoadOptions
impl UnwindSafe for LoadOptions
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more