pub struct FieldSchema {Show 15 fields
pub field_type: FieldType,
pub primary: bool,
pub generated: bool,
pub required: bool,
pub unique: bool,
pub nullable: bool,
pub reference: Option<String>,
pub min: Option<Value>,
pub max: Option<Value>,
pub format: Option<String>,
pub values: Option<Vec<String>>,
pub default: Option<Value>,
pub sensitive: bool,
pub search: bool,
pub items: Option<String>,
}Expand description
Definition of a single field in a resource schema.
Matches the inline YAML format:
email: { type: string, format: email, unique: true, required: true }Fields§
§field_type: FieldTypeThe data type of this field.
primary: boolWhether this field is the primary key.
generated: boolWhether this field is auto-generated (e.g., uuid v4, timestamps).
required: boolWhether this field is required (NOT NULL + validated on input).
unique: boolWhether this field has a unique constraint.
nullable: boolWhether this field is explicitly nullable.
reference: Option<String>Foreign key reference in resource.field format.
min: Option<Value>Minimum value (number) or length (string).
max: Option<Value>Maximum value (number) or length (string).
format: Option<String>String format validation (email, url, uuid).
values: Option<Vec<String>>Allowed values for enum-type fields.
default: Option<Value>Default value for this field.
sensitive: boolWhether this field contains sensitive data (redacted in logs).
search: boolWhether this field is included in full-text search.
items: Option<String>Element type for array fields.
Trait Implementations§
Source§impl Clone for FieldSchema
impl Clone for FieldSchema
Source§fn clone(&self) -> FieldSchema
fn clone(&self) -> FieldSchema
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 FieldSchema
impl Debug for FieldSchema
Source§impl<'de> Deserialize<'de> for FieldSchema
impl<'de> Deserialize<'de> for FieldSchema
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
Source§impl PartialEq for FieldSchema
impl PartialEq for FieldSchema
Source§impl Serialize for FieldSchema
impl Serialize for FieldSchema
impl StructuralPartialEq for FieldSchema
Auto Trait Implementations§
impl Freeze for FieldSchema
impl RefUnwindSafe for FieldSchema
impl Send for FieldSchema
impl Sync for FieldSchema
impl Unpin for FieldSchema
impl UnsafeUnpin for FieldSchema
impl UnwindSafe for FieldSchema
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more