Struct broot::verb::VerbInvocation
source · pub struct VerbInvocation {
pub name: String,
pub args: Option<String>,
pub bang: bool,
}
Expand description
the verb and its arguments, making the invocation. When coming from parsing, the args is Some as soon as there’s a separator (i.e. it’s “” in “cp “)
Fields§
§name: String
§args: Option<String>
§bang: bool
Implementations§
source§impl VerbInvocation
impl VerbInvocation
pub fn new<T: Into<String>>(name: T, args: Option<T>, bang: bool) -> Self
pub fn is_empty(&self) -> bool
sourcepub fn complete_name(&self) -> String
pub fn complete_name(&self) -> String
build a new String
sourcepub fn to_string_for_name(&self, name: &str) -> String
pub fn to_string_for_name(&self, name: &str) -> String
basically return the invocation but allow another name (the shortcut or a variant)
Trait Implementations§
source§impl Clone for VerbInvocation
impl Clone for VerbInvocation
source§fn clone(&self) -> VerbInvocation
fn clone(&self) -> VerbInvocation
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 VerbInvocation
impl Debug for VerbInvocation
source§impl Display for VerbInvocation
impl Display for VerbInvocation
source§impl From<&str> for VerbInvocation
impl From<&str> for VerbInvocation
source§impl PartialEq for VerbInvocation
impl PartialEq for VerbInvocation
source§fn eq(&self, other: &VerbInvocation) -> bool
fn eq(&self, other: &VerbInvocation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for VerbInvocation
Auto Trait Implementations§
impl RefUnwindSafe for VerbInvocation
impl Send for VerbInvocation
impl Sync for VerbInvocation
impl Unpin for VerbInvocation
impl UnwindSafe for VerbInvocation
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