pub struct Action {
pub name: String,
pub class: Vec<String>,
pub method: Option<String>,
pub href: String,
pub title: Option<String>,
pub media_type: Option<String>,
pub fields: Vec<Field>,
}Expand description
Representation of an action.
Fields§
§name: String§class: Vec<String>§method: Option<String>§href: String§title: Option<String>§media_type: Option<String>§fields: Vec<Field>Implementations§
Source§impl Action
impl Action
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 action.
§Parameters
f- The lambda function to execute on the action.
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_title<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_title<S>(self, value: S) -> Selfwhere
S: ToString,
Sourcepub fn with_method<S>(self, value: S) -> Selfwhere
S: ToString,
pub fn with_method<S>(self, value: S) -> Selfwhere
S: ToString,
Sourcepub fn with_field<V>(self, value: V) -> Self
pub fn with_field<V>(self, value: V) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnwindSafe for Action
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