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 ==
.impl StructuralPartialEq for CommandParts
Auto Trait Implementations§
impl RefUnwindSafe for CommandParts
impl Send for CommandParts
impl Sync for CommandParts
impl Unpin for CommandParts
impl UnwindSafe for CommandParts
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