Struct jsona_util::schema::Schema
source · [−]pub struct Schema {Show 41 fields
pub ref_value: Option<String>,
pub defs: Option<IndexMap<String, Schema, RandomState>>,
pub title: Option<String>,
pub description: Option<String>,
pub schema_type: Option<OneOrMultiTypes>,
pub nullable: Option<bool>,
pub default: Option<Value>,
pub maximum: Option<f64>,
pub minimum: Option<f64>,
pub exclusive_maximum: Option<bool>,
pub exclusive_minimum: Option<bool>,
pub multiple_of: Option<f64>,
pub max_length: Option<u32>,
pub min_length: Option<u32>,
pub pattern: Option<String>,
pub format: Option<String>,
pub items: Option<OneOrMultiSchemas>,
pub max_items: Option<u32>,
pub min_items: Option<u32>,
pub unique_items: Option<bool>,
pub additional_items: Option<BoolOrSchema>,
pub contains: Option<Box<Schema, Global>>,
pub properties: Option<IndexMap<String, Schema, RandomState>>,
pub max_properties: Option<u32>,
pub min_properties: Option<u32>,
pub required: Option<Vec<String, Global>>,
pub pattern_properties: Option<IndexMap<String, Schema, RandomState>>,
pub additional_properties: Option<BoolOrSchema>,
pub enum_value: Option<Vec<Value, Global>>,
pub const_value: Option<Value>,
pub examples: Option<Vec<Value, Global>>,
pub read_only: Option<bool>,
pub write_only: Option<bool>,
pub all_of: Option<Vec<Schema, Global>>,
pub one_of: Option<Vec<Schema, Global>>,
pub any_of: Option<Vec<Schema, Global>>,
pub not: Option<Vec<Schema, Global>>,
pub if_value: Option<Box<Schema, Global>>,
pub then_value: Option<Box<Schema, Global>>,
pub else_value: Option<Box<Schema, Global>>,
pub unknown: Option<Map<String, Value>>,
}
Fields
ref_value: Option<String>
defs: Option<IndexMap<String, Schema, RandomState>>
title: Option<String>
description: Option<String>
schema_type: Option<OneOrMultiTypes>
nullable: Option<bool>
default: Option<Value>
maximum: Option<f64>
minimum: Option<f64>
exclusive_maximum: Option<bool>
exclusive_minimum: Option<bool>
multiple_of: Option<f64>
max_length: Option<u32>
min_length: Option<u32>
pattern: Option<String>
format: Option<String>
items: Option<OneOrMultiSchemas>
max_items: Option<u32>
min_items: Option<u32>
unique_items: Option<bool>
additional_items: Option<BoolOrSchema>
contains: Option<Box<Schema, Global>>
properties: Option<IndexMap<String, Schema, RandomState>>
max_properties: Option<u32>
min_properties: Option<u32>
required: Option<Vec<String, Global>>
pattern_properties: Option<IndexMap<String, Schema, RandomState>>
additional_properties: Option<BoolOrSchema>
enum_value: Option<Vec<Value, Global>>
const_value: Option<Value>
examples: Option<Vec<Value, Global>>
read_only: Option<bool>
write_only: Option<bool>
all_of: Option<Vec<Schema, Global>>
one_of: Option<Vec<Schema, Global>>
any_of: Option<Vec<Schema, Global>>
not: Option<Vec<Schema, Global>>
if_value: Option<Box<Schema, Global>>
then_value: Option<Box<Schema, Global>>
else_value: Option<Box<Schema, Global>>
unknown: Option<Map<String, Value>>
Implementations
sourceimpl Schema
impl Schema
pub fn pointer(&self, keys: &Keys) -> Vec<&Schema, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
pub fn maybe_type(&self, schema_type: &SchemaType) -> bool
pub fn one_type(&self) -> Option<SchemaType>
pub fn types(&self) -> HashSet<SchemaType, RandomState>
pub fn debug_string(&self) -> String
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Schema
impl<'de> Deserialize<'de> for Schema
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Schema, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Schema, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for Schema
impl Serialize for Schema
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Schema
Auto Trait Implementations
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more