Struct openc2::Command
[−]
[src]
pub struct Command { pub action: Action, pub target: Target, pub actuator: Option<Actuator>, // some fields omitted }
An OpenC2 command communicates an action to be performed on a target.
Fields
action: Action
The task or activity to be performed.
target: Target
The object of the action. The action is performed on the target.
actuator: Option<Actuator>
The object which will perform the action on the target.
Methods
impl Command
[src]
pub fn new<T: Into<Target>>(action: Action, target: T) -> Self
[src]
Create a new command without an actuator.
pub fn with_actuator<T, A>(action: Action, target: T, actuator: A) -> Self where
T: Into<Target>,
A: Into<Actuator>,
[src]
T: Into<Target>,
A: Into<Actuator>,
Create a new command including an actuator.
Trait Implementations
impl Debug for Command
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for Command
[src]
fn clone(&self) -> Command
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more