pub struct FieldAdmin {
pub visible: bool,
pub readonly: bool,
pub label: Option<String>,
pub help: Option<String>,
pub widget: Widget,
pub options: Vec<String>,
pub placeholder: Option<String>,
pub format: ContentFormat,
}Expand description
Per-field dashboard presentation, from [fields.<name>.admin].
Fields§
§visible: boolShow this field in the dashboard at all. Hidden fields are still part of
the API (unlike Field::hidden).
readonly: boolShow the field but refuse edits.
label: Option<String>Human label. Defaults to a title-cased field name.
help: Option<String>One line of guidance shown under the input.
widget: WidgetInput to render. auto picks from the field’s type.
options: Vec<String>Allowed values, turning the input into a dropdown. Each entry may be
"value" or "value|Label".
placeholder: Option<String>Placeholder text for free-text inputs.
format: ContentFormatWhat the stored text is, for text/string fields. Purely a
presentation hint: the dashboard highlights and previews the markup,
and the API stores and returns the same characters either way.
Trait Implementations§
Source§impl Clone for FieldAdmin
impl Clone for FieldAdmin
Source§fn clone(&self) -> FieldAdmin
fn clone(&self) -> FieldAdmin
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FieldAdmin
impl Debug for FieldAdmin
Source§impl Default for FieldAdmin
impl Default for FieldAdmin
Source§impl<'de> Deserialize<'de> for FieldAdminwhere
FieldAdmin: Default,
impl<'de> Deserialize<'de> for FieldAdminwhere
FieldAdmin: Default,
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 FieldAdmin
impl RefUnwindSafe for FieldAdmin
impl Send for FieldAdmin
impl Sync for FieldAdmin
impl Unpin for FieldAdmin
impl UnsafeUnpin for FieldAdmin
impl UnwindSafe for FieldAdmin
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