Struct broot::verb::ExecutionStringBuilder
source · [−]pub struct ExecutionStringBuilder<'b> {
pub sel_info: SelInfo<'b>,
/* private fields */
}
Expand description
a temporary structure gathering selection and invocation parameters and able to generate an executable string from a verb’s execution pattern
Fields
sel_info: SelInfo<'b>
the current file selection
Implementations
sourceimpl<'b> ExecutionStringBuilder<'b>
impl<'b> ExecutionStringBuilder<'b>
sourcepub fn without_invocation(
sel_info: SelInfo<'b>,
app_state: &'b AppState
) -> Self
pub fn without_invocation(
sel_info: SelInfo<'b>,
app_state: &'b AppState
) -> Self
constructor to use when there’s no invocation string (because we’re in the process of building one, for example when a verb is triggered from a key shortcut)
pub fn with_invocation(
invocation_parser: &Option<InvocationParser>,
sel_info: SelInfo<'b>,
app_state: &'b AppState,
invocation_args: &Option<String>
) -> Self
sourcepub fn invocation_with_default(
&self,
verb_invocation: &VerbInvocation
) -> VerbInvocation
pub fn invocation_with_default(
&self,
verb_invocation: &VerbInvocation
) -> VerbInvocation
fills groups having a default value (after the colon)
This is used to fill the input in case on non auto_exec verb triggered with a key
sourcepub fn shell_exec_string(&self, exec_pattern: &ExecPattern) -> String
pub fn shell_exec_string(&self, exec_pattern: &ExecPattern) -> String
build a shell compatible command, with escapings
sourcepub fn sel_shell_exec_string(
&self,
exec_pattern: &ExecPattern,
sel: Option<Selection<'_>>
) -> String
pub fn sel_shell_exec_string(
&self,
exec_pattern: &ExecPattern,
sel: Option<Selection<'_>>
) -> String
build a shell compatible command, with escapings, for a specific selection (this is intended for execution on all selections of a stage)
Auto Trait Implementations
impl<'b> RefUnwindSafe for ExecutionStringBuilder<'b>
impl<'b> Send for ExecutionStringBuilder<'b>
impl<'b> Sync for ExecutionStringBuilder<'b>
impl<'b> Unpin for ExecutionStringBuilder<'b>
impl<'b> UnwindSafe for ExecutionStringBuilder<'b>
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