Enum broot::launchable::Launchable
source · [−]pub enum Launchable {
Printer {
to_print: String,
},
TreePrinter {
tree: Box<Tree>,
skin: Box<StyleMap>,
ext_colors: ExtColorMap,
width: u16,
height: u16,
},
Program {
exe: String,
args: Vec<String>,
working_dir: Option<PathBuf>,
capture_mouse: bool,
},
SystemOpen {
path: PathBuf,
},
}
Expand description
description of a possible launch of an external program A launchable can only be executed on end of life of broot.
Variants
Printer
Fields
to_print: String
just print something on stdout on end of broot
TreePrinter
print the tree on end of broot
Program
execute an external program
SystemOpen
Fields
path: PathBuf
open a path
Implementations
sourceimpl Launchable
impl Launchable
pub fn opener(path: PathBuf) -> Launchable
pub fn printer(to_print: String) -> Launchable
pub fn tree_printer(
tree: &Tree,
screen: Screen,
style_map: StyleMap,
ext_colors: ExtColorMap
) -> Launchable
pub fn program(
parts: Vec<String>,
working_dir: Option<PathBuf>,
con: &AppContext
) -> Result<Launchable>
pub fn execute(&self, w: Option<&mut W>) -> Result<(), ProgramError>
Trait Implementations
sourceimpl Debug for Launchable
impl Debug for Launchable
sourceimpl From<Launchable> for CmdResult
impl From<Launchable> for CmdResult
sourcefn from(launchable: Launchable) -> Self
fn from(launchable: Launchable) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl RefUnwindSafe for Launchable
impl Send for Launchable
impl Sync for Launchable
impl Unpin for Launchable
impl UnwindSafe for Launchable
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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