#[non_exhaustive]pub struct Action {
pub observation: Option<Observation>,
pub action: Option<Action>,
/* private fields */
}Expand description
Action.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.observation: Option<Observation>Observation.
action: Option<Action>The action.
Implementations§
Source§impl Action
impl Action
pub fn new() -> Self
Sourcepub fn set_observation<T>(self, v: T) -> Selfwhere
T: Into<Observation>,
pub fn set_observation<T>(self, v: T) -> Selfwhere
T: Into<Observation>,
Sets the value of observation.
Sourcepub fn set_or_clear_observation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Observation>,
pub fn set_or_clear_observation<T>(self, v: Option<T>) -> Selfwhere
T: Into<Observation>,
Sets or clears the value of observation.
Sourcepub fn set_action<T: Into<Option<Action>>>(self, v: T) -> Self
pub fn set_action<T: Into<Option<Action>>>(self, v: T) -> Self
Sets the value of action.
Note that all the setters affecting action are mutually
exclusive.
Sourcepub fn search_action(&self) -> Option<&Box<SearchAction>>
pub fn search_action(&self) -> Option<&Box<SearchAction>>
The value of action
if it holds a SearchAction, None if the field is not set or
holds a different branch.
Sourcepub fn set_search_action<T: Into<Box<SearchAction>>>(self, v: T) -> Self
pub fn set_search_action<T: Into<Box<SearchAction>>>(self, v: T) -> Self
Sets the value of action
to hold a SearchAction.
Note that all the setters affecting action are
mutually exclusive.
Trait Implementations§
impl StructuralPartialEq for Action
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