#[non_exhaustive]pub struct SchemaField {
pub name: String,
pub description: String,
pub type: Type,
pub mode: Mode,
pub fields: Vec<SchemaField>,
/* private fields */
}Expand description
Represents a column field within a table schema.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringRequired. The name of the field. Must contain only letters, numbers and underscores, with a maximum length of 767 characters, and must begin with a letter or underscore.
description: StringOptional. User friendly field description. Must be less than or equal to 1024 characters.
type: TypeRequired. The type of field.
mode: ModeRequired. Additional field semantics.
fields: Vec<SchemaField>Optional. Any nested field for complex types.
Implementations§
Source§impl SchemaField
impl SchemaField
pub fn new() -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Sets the value of description.
Sourcepub fn set_fields<T, V>(self, v: T) -> Self
pub fn set_fields<T, V>(self, v: T) -> Self
Sets the value of fields.
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 Message for SchemaField
impl Message for SchemaField
Source§impl PartialEq for SchemaField
impl PartialEq for SchemaField
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