pub enum TypeDecl {
Bool,
Integer,
Decimal,
Text {
max_bytes: u64,
},
Timestamp,
Enum {
options: Vec<String>,
},
List {
item: Box<TypeDecl>,
max_items: u64,
},
Record {
fields: Vec<FieldDecl>,
present_when: Option<PresentWhen>,
},
Nullable {
ty: Box<TypeDecl>,
},
Map {
key_max_bytes: u64,
value: Box<TypeDecl>,
max_entries: u64,
},
}Expand description
Input value types (spec 002, 3.7.2). Every record field is required.
Variants§
Bool
Integer
Decimal
Text
Timestamp
Enum
List
Record
Fields
§
present_when: Option<PresentWhen>Version 2: when a decoded record is present (spec 032, 3.4.2).
Nullable
Version 2, record fields only: JSON null or a missing key, stored
as null (spec 032, 3.4.1).
Map
Version 2: a JSON object with text keys (spec 032, 3.4.1).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TypeDecl
impl<'de> Deserialize<'de> for TypeDecl
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 Eq for TypeDecl
Source§impl JsonSchema for TypeDecl
impl JsonSchema for TypeDecl
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for TypeDecl
Auto Trait Implementations§
impl Freeze for TypeDecl
impl RefUnwindSafe for TypeDecl
impl Send for TypeDecl
impl Sync for TypeDecl
impl Unpin for TypeDecl
impl UnsafeUnpin for TypeDecl
impl UnwindSafe for TypeDecl
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