#[non_exhaustive]pub enum FieldKind {
Show 15 variants
Text,
Email,
Password,
Url,
Tel,
Textarea,
Number,
Money,
Quantity,
Date,
DateTime,
Select,
Checkbox,
Toggle,
BelongsTo,
}Expand description
What a Field asks for, which decides the kit macro that draws it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Text
One line of text.
An email address (type="email").
Password
A password: never filled in from the record.
Url
A web address (type="url").
Tel
A phone number (type="tel").
Textarea
Several lines of text.
Number
A number (type="number").
Money
An amount kept in the currency’s smallest unit, shown and typed in whole units, with the currency’s code before it.
Quantity
An exact quantity (Quantity<S>), shown and typed as a decimal with
the scale’s digits and, with Field::unit_from, the record’s unit
after it.
Date
A date with a calendar (NaiveDate, sent as YYYY-MM-DD).
DateTime
A date and a time (type="datetime-local", sent as
YYYY-MM-DDTHH:MM).
Select
One of a few values.
Checkbox
A yes/no checkbox (bool).
Toggle
A yes/no switch (bool).
BelongsTo
The id of a row of another table, chosen by one of its columns.
Trait Implementations§
impl Copy for FieldKind
impl Eq for FieldKind
impl StructuralPartialEq for FieldKind
Auto Trait Implementations§
impl Freeze for FieldKind
impl RefUnwindSafe for FieldKind
impl Send for FieldKind
impl Sync for FieldKind
impl Unpin for FieldKind
impl UnsafeUnpin for FieldKind
impl UnwindSafe for FieldKind
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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> ⓘ
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