pub struct ActionContext {
pub frame: Frame,
pub space: Rc<RefCell<dyn ObjectSpace>>,
pub selected: Vec<Object>,
pub view: Option<ViewInfo>,
pub input: ActionInput,
/* private fields */
}Expand description
What an action sees while running. A copy is the same run: what it asks for next counts.
Fields§
§frame: FrameThe frame it runs in.
space: Rc<RefCell<dyn ObjectSpace>>The records to read and write. A handler commits when it means to.
selected: Vec<Object>The records selected.
view: Option<ViewInfo>The view it runs on.
input: ActionInputWhat people gave it.
Implementations§
Source§impl ActionContext
impl ActionContext
Sourcepub fn service<T: 'static>(&self) -> Option<Rc<T>>
pub fn service<T: 'static>(&self) -> Option<Rc<T>>
Something the application gave its actions, by its type.
Sourcepub fn message(&self, message: Message)
pub fn message(&self, message: Message)
Tells people something, as long as whoever shows the application listens.
Sourcepub fn show_view(&self, id: impl Into<String>)
pub fn show_view(&self, id: impl Into<String>)
Asks the frame to show this view when the action ends.
Sourcepub fn records_changed(&self)
pub fn records_changed(&self)
Tells whoever shows the application that records changed, so what shows them reads again.
Trait Implementations§
Source§impl Clone for ActionContext
impl Clone for ActionContext
Source§fn clone(&self) -> ActionContext
fn clone(&self) -> ActionContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ActionContext
impl !Send for ActionContext
impl !Sync for ActionContext
impl !UnwindSafe for ActionContext
impl Freeze for ActionContext
impl Unpin for ActionContext
impl UnsafeUnpin for ActionContext
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