pub struct Shape {
pub types: Vec<JsonType>,
pub fields: IndexMap<String, Field>,
pub items: Option<Box<Shape>>,
pub minimum: Option<f64>,
pub maximum: Option<f64>,
pub format: Option<String>,
pub enumeration: Option<Vec<Value>>,
pub examples: Vec<Value>,
pub description: Option<String>,
pub label: Option<String>,
pub hidden: bool,
/* private fields */
}Expand description
The structure of the values found at one place in the documents.
Fields§
§types: Vec<JsonType>The types seen. Integer is dropped as soon as a non-integral number is seen.
fields: IndexMap<String, Field>Fields of the objects, in first-seen order.
items: Option<Box<Shape>>The shape of array items.
minimum: Option<f64>Smallest number seen.
maximum: Option<f64>Largest number seen.
format: Option<String>A string format shared by every string seen: date-time, date, time, email,
uuid or uri.
enumeration: Option<Vec<Value>>The allowed values, when known (from an override, a JSON Schema, or inferred from a small set of repeated values).
examples: Vec<Value>A few example values.
description: Option<String>What the value means.
label: Option<String>A short display name.
Hidden values are not suggested by completion.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Shape
impl<'de> Deserialize<'de> for Shape
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Shape
Auto Trait Implementations§
impl Freeze for Shape
impl RefUnwindSafe for Shape
impl Send for Shape
impl Sync for Shape
impl Unpin for Shape
impl UnsafeUnpin for Shape
impl UnwindSafe for Shape
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