pub struct SchemaNode {
pub schema_type: Option<SchemaType>,
pub required: Vec<String>,
pub min_length: Option<usize>,
pub max_length: Option<usize>,
pub minimum: Option<f64>,
pub maximum: Option<f64>,
pub description: Option<String>,
}Expand description
A minimal JSON Schema node.
Fields§
§schema_type: Option<SchemaType>§required: Vec<String>§min_length: Option<usize>§max_length: Option<usize>§minimum: Option<f64>§maximum: Option<f64>§description: Option<String>Implementations§
Source§impl SchemaNode
impl SchemaNode
Sourcepub fn with_type(self, t: SchemaType) -> Self
pub fn with_type(self, t: SchemaType) -> Self
Set the type constraint.
Sourcepub fn with_minimum(self, v: f64) -> Self
pub fn with_minimum(self, v: f64) -> Self
Set the minimum numeric value.
Sourcepub fn with_maximum(self, v: f64) -> Self
pub fn with_maximum(self, v: f64) -> Self
Set the maximum numeric value.
Trait Implementations§
Source§impl Clone for SchemaNode
impl Clone for SchemaNode
Source§fn clone(&self) -> SchemaNode
fn clone(&self) -> SchemaNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchemaNode
impl Debug for SchemaNode
Auto Trait Implementations§
impl Freeze for SchemaNode
impl RefUnwindSafe for SchemaNode
impl Send for SchemaNode
impl Sync for SchemaNode
impl Unpin for SchemaNode
impl UnsafeUnpin for SchemaNode
impl UnwindSafe for SchemaNode
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