pub struct Field {
pub ty: FieldType,
pub references: Option<String>,
pub required: bool,
pub unique: bool,
pub hidden: bool,
pub default: Option<Value>,
pub max_length: Option<u32>,
pub on_delete: Option<OnDelete>,
pub admin: FieldAdmin,
}Expand description
One column in a resource.
Fields§
§ty: FieldType§references: Option<String>Target resource name when ty == Reference.
required: bool§unique: boolExclude from API responses (e.g. password hashes).
default: Option<Value>Optional default rendered as a SQL literal.
max_length: Option<u32>§on_delete: Option<OnDelete>For reference fields: what happens to this row when the referenced row
is deleted. Defaults to OnDelete::Restrict (safe: blocks orphaning).
admin: FieldAdminDashboard presentation for this field, from [fields.<name>.admin].
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Field
impl<'de> Deserialize<'de> for Field
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
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin for Field
impl UnsafeUnpin for Field
impl UnwindSafe for Field
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