pub struct StructField {Show 19 fields
pub schema_type: SchemaType,
pub original_name: String,
pub required: bool,
pub description: Option<String>,
pub format: Option<String>,
pub default: Option<Value>,
pub deprecated: bool,
pub min_length: Option<usize>,
pub max_length: Option<usize>,
pub minimum: Option<f64>,
pub maximum: Option<f64>,
pub exclusive_minimum: Option<f64>,
pub exclusive_maximum: Option<f64>,
pub pattern: Option<String>,
pub format_renames: IndexMap<String, String>,
pub skip_formats: Vec<String>,
pub flatten: bool,
pub nullable: bool,
pub metadata: IndexMap<String, Value>,
}Fields§
§schema_type: SchemaType§original_name: String§required: bool§description: Option<String>§format: Option<String>§default: Option<Value>§deprecated: bool§min_length: Option<usize>§max_length: Option<usize>§minimum: Option<f64>§maximum: Option<f64>§exclusive_minimum: Option<f64>§exclusive_maximum: Option<f64>§pattern: Option<String>§format_renames: IndexMap<String, String>§skip_formats: Vec<String>§flatten: bool§nullable: bool§metadata: IndexMap<String, Value>Implementations§
Source§impl StructField
impl StructField
pub fn new( schema_type: SchemaType, original_name: impl Into<String>, ) -> StructField
pub fn with_description(self, description: impl Into<String>) -> StructField
pub fn with_format(self, format: impl Into<String>) -> StructField
pub fn with_default(self, default: Value) -> StructField
pub fn deprecated(self) -> StructField
pub fn with_length(self, min: Option<usize>, max: Option<usize>) -> StructField
pub fn with_range(self, min: Option<f64>, max: Option<f64>) -> StructField
pub fn with_pattern(self, pattern: impl Into<String>) -> StructField
pub fn flattened(self) -> StructField
pub fn nullable(self) -> StructField
pub fn with_required(self, required: bool) -> StructField
Trait Implementations§
Source§impl Clone for StructField
impl Clone for StructField
Source§fn clone(&self) -> StructField
fn clone(&self) -> StructField
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 StructField
impl Debug for StructField
Source§impl<'de> Deserialize<'de> for StructField
impl<'de> Deserialize<'de> for StructField
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StructField, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StructField, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StructField
impl PartialEq for StructField
Source§impl Serialize for StructField
impl Serialize for StructField
Source§fn 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 StructField
Auto Trait Implementations§
impl Freeze for StructField
impl RefUnwindSafe for StructField
impl Send for StructField
impl Sync for StructField
impl Unpin for StructField
impl UnwindSafe for StructField
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