pub struct ExecutableCommand {
pub subjects: Vec<Value>,
pub properties: HashMap<String, Value>,
pub routine: Routine,
}Expand description
Represents a command that can be executed, with a list of command subjects and a set of command options, and a callback function that defines the command logic.
Example:
ExecutableCommand
{
subjects : vec![ Value::String( "subject_value".to_string() ), /* ... */ ],
properties : HashMap::from_iter(
[
( "prop_name".to_string(), Value::Number( 42.0 ) ),
/* ... */
]),
routine : Routine::new( |( args, props )| Ok( () ) )
};Fields§
§subjects: Vec<Value>subjects values
properties: HashMap<String, Value>properties value
routine: Routinefunction that will be called
Trait Implementations§
source§impl Clone for ExecutableCommand
impl Clone for ExecutableCommand
source§fn clone(&self) -> ExecutableCommand
fn clone(&self) -> ExecutableCommand
Returns a copy of the value. Read more
1.0.0 · 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 ExecutableCommand
impl !Send for ExecutableCommand
impl !Sync for ExecutableCommand
impl Unpin for ExecutableCommand
impl !UnwindSafe for ExecutableCommand
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