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>,
switch_terminal: bool,
capture_mouse: bool,
keyboard_enhanced: 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
just print something on stdout on end of broot
TreePrinter
print the tree on end of broot
Program
Fields
execute an external program
SystemOpen
open a path
Implementations§
source§impl 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>, switch_terminal: bool, con: &AppContext ) -> Result<Launchable>
pub fn execute(&self, w: Option<&mut W>) -> Result<(), ProgramError>
Trait Implementations§
source§impl Debug for Launchable
impl Debug for Launchable
source§impl From<Launchable> for CmdResult
impl From<Launchable> for CmdResult
source§fn 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§
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