Struct broot::command::CommandParts
source · pub struct CommandParts {
pub raw_pattern: String,
pub pattern: BeTree<PatternOperator, PatternParts>,
pub verb_invocation: Option<VerbInvocation>,
}
Expand description
An intermediate parsed representation of the raw string
Fields§
§raw_pattern: String
§pattern: BeTree<PatternOperator, PatternParts>
§verb_invocation: Option<VerbInvocation>
Implementations§
source§impl CommandParts
impl CommandParts
pub fn has_not_empty_verb_invocation(&self) -> bool
pub fn from<S: Into<String>>(raw: S) -> Self
sourcepub fn split(self) -> (Option<CommandParts>, Option<CommandParts>)
pub fn split(self) -> (Option<CommandParts>, Option<CommandParts>)
split an input into its two possible parts, the pattern and the verb invocation. Each part, when defined, is suitable to create a command on its own.
Trait Implementations§
source§impl Clone for CommandParts
impl Clone for CommandParts
source§fn clone(&self) -> CommandParts
fn clone(&self) -> CommandParts
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 moresource§impl Debug for CommandParts
impl Debug for CommandParts
source§impl Display for CommandParts
impl Display for CommandParts
source§impl PartialEq<CommandParts> for CommandParts
impl PartialEq<CommandParts> for CommandParts
source§fn eq(&self, other: &CommandParts) -> bool
fn eq(&self, other: &CommandParts) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.