Struct schematic_types::SchemaField
source · pub struct SchemaField {
pub name: Option<String>,
pub description: Option<String>,
pub type_of: SchemaType,
pub deprecated: bool,
pub hidden: bool,
pub nullable: bool,
pub optional: bool,
pub read_only: bool,
pub write_only: bool,
}Expand description
Represents a field within a schema struct, or a variant within a schema enum/union.
Fields§
§name: Option<String>§description: Option<String>§type_of: SchemaType§deprecated: bool§nullable: bool§optional: bool§read_only: bool§write_only: boolImplementations§
source§impl SchemaField
impl SchemaField
sourcepub fn new(name: &str, type_of: SchemaType) -> SchemaField
pub fn new(name: &str, type_of: SchemaType) -> SchemaField
Create a new field with the provided name and type.
Trait Implementations§
source§impl Clone for SchemaField
impl Clone for SchemaField
source§fn clone(&self) -> SchemaField
fn clone(&self) -> SchemaField
Returns a copy 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
Auto Trait Implementations§
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