pub struct Command {
pub parts: Vec<CommandPart>,
/* private fields */
}Expand description
Represents a complete SCPI command with all its parts.
An SCPI command consists of multiple parts separated by colons, for example: “SYSTem:ERRor:NEXT?” is a command with three parts and is a query (ends with ‘?’).
The command can also have optional parts, indicated by square brackets, like: “[STATus]:EVENt?” where “STATus” is optional.
Fields§
§parts: Vec<CommandPart>The parts of the command name.
Implementations§
Source§impl Command
impl Command
Sourcepub fn is_query(&self) -> bool
pub fn is_query(&self) -> bool
Returns whether this command is a query (ends with a question mark).
Sourcepub fn canonical_path(&self) -> String
pub fn canonical_path(&self) -> String
Returns the canonical (long-form) representation of this command.
This is the complete command with all parts in their long form, separated by colons, and with a question mark at the end if it’s a query.
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 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