pub struct OptimizeNode;Trait Implementations§
Source§impl EnumerableNode for OptimizeNode
impl EnumerableNode for OptimizeNode
Source§fn elements(&self, _partial: Option<&Value>) -> Vec<ElementSpec>
fn elements(&self, _partial: Option<&Value>) -> Vec<ElementSpec>
Valid sub-elements.
partial is the (possibly incomplete)
AST value AT this node when the caller has one; nodes may
narrow their element set from it. None yields the
unconditioned surface.Source§fn open_surface(&self) -> Option<&'static str>
fn open_surface(&self) -> Option<&'static str>
When this node also accepts keys OUTSIDE the enumerated
set, the reason (open vocabularies are declared, never
implied).
None = closed surface.Source§fn validate(&self, value: &Value, mode: Mode) -> Vec<Violation>where
Self: Sized,
fn validate(&self, value: &Value, mode: Mode) -> Vec<Violation>where
Self: Sized,
Validate
value as an instance of this node kind:
unknown keys on closed surfaces, form conformance per
element, and (in Mode::Complete) required elements —
recursing through nested node references. This is the
runtime type check of the construction grammar.Auto Trait Implementations§
impl Freeze for OptimizeNode
impl RefUnwindSafe for OptimizeNode
impl Send for OptimizeNode
impl Sync for OptimizeNode
impl Unpin for OptimizeNode
impl UnsafeUnpin for OptimizeNode
impl UnwindSafe for OptimizeNode
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