pub struct ObjectSchema {
pub base: BaseSchema,
pub metadata: Option<HashMap<String, String>>,
pub properties: Option<LinkedHashMap<String, YamlSchema>>,
pub required: Option<Vec<String>>,
pub additional_properties: Option<BoolOrTypedSchema>,
pub pattern_properties: Option<LinkedHashMap<String, YamlSchema>>,
pub property_names: Option<StringSchema>,
pub min_properties: Option<usize>,
pub max_properties: Option<usize>,
pub any_of: Option<AnyOfSchema>,
}Expand description
An object schema
Fields§
§base: BaseSchema§metadata: Option<HashMap<String, String>>§properties: Option<LinkedHashMap<String, YamlSchema>>§required: Option<Vec<String>>§additional_properties: Option<BoolOrTypedSchema>§pattern_properties: Option<LinkedHashMap<String, YamlSchema>>§property_names: Option<StringSchema>§min_properties: Option<usize>§max_properties: Option<usize>§any_of: Option<AnyOfSchema>Implementations§
Source§impl ObjectSchema
impl ObjectSchema
pub fn from_base(base: BaseSchema) -> Self
pub fn builder() -> ObjectSchemaBuilder
Trait Implementations§
Source§impl Debug for ObjectSchema
impl Debug for ObjectSchema
Source§impl Default for ObjectSchema
impl Default for ObjectSchema
Source§fn default() -> ObjectSchema
fn default() -> ObjectSchema
Returns the “default value” for a type. Read more
Source§impl Display for ObjectSchema
impl Display for ObjectSchema
Source§impl PartialEq for ObjectSchema
impl PartialEq for ObjectSchema
Source§impl SchemaMetadata for ObjectSchema
impl SchemaMetadata for ObjectSchema
fn get_accepted_keys() -> &'static [&'static str]
Source§impl TryFrom<&LinkedHashMap<MarkedYaml<'_>, MarkedYaml<'_>>> for ObjectSchema
impl TryFrom<&LinkedHashMap<MarkedYaml<'_>, MarkedYaml<'_>>> for ObjectSchema
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 ObjectSchema
impl TryFrom<&MarkedYaml<'_>> for ObjectSchema
Source§impl Validator for ObjectSchema
impl Validator for ObjectSchema
impl StructuralPartialEq for ObjectSchema
Auto Trait Implementations§
impl Freeze for ObjectSchema
impl RefUnwindSafe for ObjectSchema
impl Send for ObjectSchema
impl Sync for ObjectSchema
impl Unpin for ObjectSchema
impl UnwindSafe for ObjectSchema
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.