Struct wca::VerifiedCommand
source · pub struct VerifiedCommand {
pub phrase: String,
pub subjects: Vec<Value>,
pub properties: HashMap<String, Value>,
}Expand description
Represents a grammatically correct command with a phrase descriptor, a list of command subjects, and a set of command options.
§Example:
VerifiedCommand
{
phrase : "command".to_string(),
subjects : vec![ Value::String( "subject_value".to_string() ), /* ... */ ],
properties : HashMap::from_iter(
[
( "prop_name".to_string(), Value::Number( 42.0 ) ),
/* ... */
])
};In the above example, a VerifiedCommand instance is created with the name “command”, a single subject “subject_value”, and one property “prop_name” with a typed values.
Fields§
§phrase: StringPhrase descriptor for command.
subjects: Vec<Value>Command subjects.
properties: HashMap<String, Value>Command options.
Trait Implementations§
source§impl Clone for VerifiedCommand
impl Clone for VerifiedCommand
source§fn clone(&self) -> VerifiedCommand
fn clone(&self) -> VerifiedCommand
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 Freeze for VerifiedCommand
impl RefUnwindSafe for VerifiedCommand
impl Send for VerifiedCommand
impl Sync for VerifiedCommand
impl Unpin for VerifiedCommand
impl UnwindSafe for VerifiedCommand
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
source§impl<S> SetWithType for S
impl<S> SetWithType for S
source§fn set_with_type<T, IntoT>(&mut self, component: IntoT)where
IntoT: Into<T>,
S: SetComponent<T, IntoT>,
fn set_with_type<T, IntoT>(&mut self, component: IntoT)where
IntoT: Into<T>,
S: SetComponent<T, IntoT>,
Function to set value of a component by its type.