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
sourceimpl CommandParts
impl CommandParts
pub fn has_not_empty_verb_invocation(&self) -> bool
pub fn from(raw: String) -> 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
sourceimpl Clone for CommandParts
impl Clone for CommandParts
sourcefn clone(&self) -> CommandParts
fn clone(&self) -> CommandParts
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CommandParts
impl Debug 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more