pub struct SchemaField {
pub aliases: Vec<String>,
pub comment: Option<String>,
pub schema: Schema,
pub deprecated: Option<String>,
pub env_var: Option<String>,
pub hidden: bool,
pub nullable: bool,
pub optional: bool,
pub read_only: bool,
pub write_only: bool,
}
Expand description
Describes the metadata and shape of a field within a struct or enum.
Fields§
§aliases: Vec<String>
§comment: Option<String>
§schema: Schema
§deprecated: Option<String>
§env_var: Option<String>
§nullable: bool
§optional: bool
§read_only: bool
§write_only: bool
Implementations§
Trait Implementations§
Source§impl Clone for SchemaField
impl Clone for SchemaField
Source§fn clone(&self) -> SchemaField
fn clone(&self) -> SchemaField
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 SchemaField
impl Debug for SchemaField
Source§impl Default for SchemaField
impl Default for SchemaField
Source§fn default() -> SchemaField
fn default() -> SchemaField
Returns the “default value” for a type. Read more
Source§impl From<Schema> for SchemaField
impl From<Schema> for SchemaField
Source§impl From<SchemaField> for Schema
impl From<SchemaField> for Schema
Source§fn from(val: SchemaField) -> Self
fn from(val: SchemaField) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SchemaField
impl PartialEq for SchemaField
Source§impl Schematic for SchemaField
impl Schematic for SchemaField
Source§fn schema_name() -> Option<String>
fn schema_name() -> Option<String>
Define a name for this schema type. Names are required for non-primitive values
as a means to link references, and avoid cycles.
Source§fn build_schema(schema: SchemaBuilder) -> Schema
fn build_schema(schema: SchemaBuilder) -> Schema
Create and return a schema that models the structure of the implementing type.
The schema can be used to generate code, documentation, or other artifacts.
impl StructuralPartialEq for SchemaField
Auto Trait Implementations§
impl Freeze for SchemaField
impl RefUnwindSafe for SchemaField
impl Send for SchemaField
impl Sync for SchemaField
impl Unpin for SchemaField
impl UnwindSafe for SchemaField
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