pub struct OneOfSchema {
pub one_of: Vec<YamlSchema>,
}Expand description
The oneOf schema is a schema that matches if one, and only one of the schemas in the oneOf array match.
The schemas are tried in order, and the first match is used. If no match is found, an error is added
to the context.
Fields§
§one_of: Vec<YamlSchema>Trait Implementations§
Source§impl Debug for OneOfSchema
impl Debug for OneOfSchema
Source§impl Default for OneOfSchema
impl Default for OneOfSchema
Source§fn default() -> OneOfSchema
fn default() -> OneOfSchema
Returns the “default value” for a type. Read more
Source§impl Display for OneOfSchema
impl Display for OneOfSchema
Source§impl PartialEq for OneOfSchema
impl PartialEq for OneOfSchema
Source§impl TryFrom<&LinkedHashMap<MarkedYaml<'_>, MarkedYaml<'_>>> for OneOfSchema
impl TryFrom<&LinkedHashMap<MarkedYaml<'_>, MarkedYaml<'_>>> for OneOfSchema
Source§fn try_from(mapping: &AnnotatedMapping<'_, MarkedYaml<'_>>) -> Result<Self>
fn try_from(mapping: &AnnotatedMapping<'_, MarkedYaml<'_>>) -> Result<Self>
Performs the conversion.
Source§impl TryFrom<&MarkedYaml<'_>> for OneOfSchema
impl TryFrom<&MarkedYaml<'_>> for OneOfSchema
Source§impl Validator for OneOfSchema
impl Validator for OneOfSchema
impl StructuralPartialEq for OneOfSchema
Auto Trait Implementations§
impl Freeze for OneOfSchema
impl RefUnwindSafe for OneOfSchema
impl Send for OneOfSchema
impl Sync for OneOfSchema
impl Unpin for OneOfSchema
impl UnwindSafe for OneOfSchema
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
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.