pub struct Field {
pub name: String,
pub class: Vec<String>,
pub input_type: Option<String>,
pub value: Option<Value>,
pub title: Option<String>,
}Expand description
Representation of a field within an action.
Fields§
§name: String§class: Vec<String>§input_type: Option<String>§value: Option<Value>§title: Option<String>Implementations§
Source§impl Field
impl Field
Sourcepub fn with<F>(self, f: F) -> Selfwhere
F: Fn(Self) -> Self,
pub fn with<F>(self, f: F) -> Selfwhere
F: Fn(Self) -> Self,
Apply a lambda to specify additional details on the field.
§Parameters
f- The lambda function to execute on the field.
Sourcepub fn with_class<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_class<S>(self, value: S) -> Selfwhere
S: ToString,
Sourcepub fn with_value<S>(self, value: S) -> Selfwhere
S: Serialize,
pub fn with_value<S>(self, value: S) -> Selfwhere
S: Serialize,
Sourcepub fn with_title<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_title<S>(self, value: S) -> Selfwhere
S: ToString,
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Field
impl RefUnwindSafe for Field
impl Send for Field
impl Sync for Field
impl Unpin 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