pub struct Command {
pub update: Option<HashMap<String, Value>>,
pub goto: Navigation,
}Expand description
A command that combines state updates with navigation instructions.
Fields§
§update: Option<HashMap<String, Value>>Optional state updates to apply
goto: NavigationNavigation instruction
Implementations§
Source§impl Command
impl Command
Sourcepub fn goto(node: impl Into<String>) -> Self
pub fn goto(node: impl Into<String>) -> Self
Create a command that navigates to a specific node
Sourcepub fn update(updates: HashMap<String, Value>) -> Self
pub fn update(updates: HashMap<String, Value>) -> Self
Create a command with state updates and default navigation
Sourcepub fn with_update(self, updates: HashMap<String, Value>) -> Self
pub fn with_update(self, updates: HashMap<String, Value>) -> Self
Add state updates to this command
Sourcepub fn with_goto(self, goto: Navigation) -> Self
pub fn with_goto(self, goto: Navigation) -> Self
Set the navigation for this command
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
impl UnwindSafe for Command
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