pub struct AdminField {
pub name: &'static str,
pub label: &'static str,
pub field_type: FieldType,
pub editable: bool,
pub relation: Option<AdminRelation>,
pub choices: Option<&'static [&'static str]>,
}Fields§
§name: &'static str§label: &'static str§field_type: FieldType§editable: bool§relation: Option<AdminRelation>§choices: Option<&'static [&'static str]>Closed list of allowed string values for this field. When
Some, the form layer renders a <select> with one option per
entry. The values double as labels (raw, not humanised) per
the “no invented content” rule.
Trait Implementations§
Source§impl Clone for AdminField
impl Clone for AdminField
Source§fn clone(&self) -> AdminField
fn clone(&self) -> AdminField
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 moreAuto Trait Implementations§
impl Freeze for AdminField
impl RefUnwindSafe for AdminField
impl Send for AdminField
impl Sync for AdminField
impl Unpin for AdminField
impl UnsafeUnpin for AdminField
impl UnwindSafe for AdminField
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