Skip to main content

FieldSettings

Struct FieldSettings 

Source
pub struct FieldSettings {
Show 36 fields pub key: bool, pub typed_key: bool, pub caption: Option<LitStr>, pub default_property: bool, pub read_only: bool, pub no_list: bool, pub no_detail: bool, pub lookup: bool, pub kind: Option<KindSpec>, pub calculated: Option<LitStr>, pub default: Option<Expr>, pub required: bool, pub unique: bool, pub min: Option<Expr>, pub max: Option<Expr>, pub matches: Option<LitStr>, pub message: Option<LitStr>, pub editor: Option<LitStr>, pub placeholder: Option<LitStr>, pub hint: Option<LitStr>, pub accessible_name: Option<LitStr>, pub accessible_description: Option<LitStr>, pub lookup_filter: Option<LitStr>, pub none_caption: Option<LitStr>, pub back_reference: Option<LitStr>, pub most_bytes: Option<LitInt>, pub wide: bool, pub autofocus: bool, pub non_cloneable: bool, pub secret: bool, pub aggregated: bool, pub group: Option<LitStr>, pub display_format: Option<LitStr>, pub edit_mask: Option<LitStr>, pub predefined: Option<Vec<String>>, pub criteria_of: Option<LitStr>,
}
Expand description

#[field(...)] on a field.

Fields§

§key: bool

key in the attribute.

§typed_key: bool

typed_key in the attribute.

§caption: Option<LitStr>

What people see.

§default_property: bool

default_property in the attribute.

§read_only: bool

read_only in the attribute.

§no_list: bool

no_list in the attribute.

§no_detail: bool

no_detail in the attribute.

§lookup: bool

lookup in the attribute.

§kind: Option<KindSpec>

What it holds, when the attribute says.

§calculated: Option<LitStr>

calculated = "...", checked against the struct’s fields.

§default: Option<Expr>

default = ..., any expression; a running program reads only literals and enum options.

§required: bool

required in the attribute.

§unique: bool

unique in the attribute.

§min: Option<Expr>

min in the attribute.

§max: Option<Expr>

max in the attribute.

§matches: Option<LitStr>

matches = "...", checked to be a valid pattern.

§message: Option<LitStr>

What to say instead of the usual words.

§editor: Option<LitStr>

editor in the attribute.

§placeholder: Option<LitStr>

placeholder in the attribute.

§hint: Option<LitStr>

hint in the attribute.

§accessible_name: Option<LitStr>

accessible_name in the attribute.

§accessible_description: Option<LitStr>

accessible_description in the attribute.

§lookup_filter: Option<LitStr>

lookup_filter in the attribute.

§none_caption: Option<LitStr>

none_caption in the attribute.

§back_reference: Option<LitStr>

back_reference in the attribute.

§most_bytes: Option<LitInt>

most_bytes in the attribute.

§wide: bool

wide in the attribute.

§autofocus: bool

autofocus in the attribute.

§non_cloneable: bool

non_cloneable in the attribute.

§secret: bool

secret in the attribute.

§aggregated: bool

aggregated in the attribute.

§group: Option<LitStr>

group in the attribute.

§display_format: Option<LitStr>

display_format in the attribute.

§edit_mask: Option<LitStr>

edit_mask in the attribute.

§predefined: Option<Vec<String>>

predefined = "a,b", as values.

§criteria_of: Option<LitStr>

criteria_of in the attribute.

Trait Implementations§

Source§

impl Clone for FieldSettings

Source§

fn clone(&self) -> FieldSettings

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FieldSettings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FieldSettings

Source§

fn default() -> FieldSettings

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.