pub struct DefaultSystem { /* private fields */ }Expand description
A default implementation for system interactions
Implementations§
Source§impl DefaultSystem
impl DefaultSystem
pub fn from_env() -> Self
pub fn without_clipboard_provider() -> Self
Trait Implementations§
Source§impl Debug for DefaultSystem
impl Debug for DefaultSystem
Source§impl System for DefaultSystem
impl System for DefaultSystem
Source§fn read_clipboard(&self) -> Result<String>
fn read_clipboard(&self) -> Result<String>
Read the current contents of the clipboard
Source§fn store_child_handle(&mut self, cmd: &str, child: Child)
fn store_child_handle(&mut self, cmd: &str, child: Child)
Store a handle to a running Child followinga call to System::run_command.
Source§fn running_children(&self) -> Vec<String>
fn running_children(&self) -> Vec<String>
Provide an ordered list of currently running child processes by their command string
Source§fn n_running_children(&self) -> usize
fn n_running_children(&self) -> usize
The number of currently running child processes
Source§fn cleanup_child(&mut self, id: u32)
fn cleanup_child(&mut self, id: u32)
Cleanup any resources associated with a child process that is now complete
Source§fn kill_child(&mut self, idx: usize)
fn kill_child(&mut self, idx: usize)
Kill a child process by its index in the list returned from System::running_children.
Source§fn run_command_blocking(
&self,
cmd: &str,
cwd: &Path,
bufid: usize,
) -> Result<String>
fn run_command_blocking( &self, cmd: &str, cwd: &Path, bufid: usize, ) -> Result<String>
Run an external command and collect its output.
Source§fn run_command(
&mut self,
cmd: &str,
cwd: &Path,
bufid: usize,
tx: Sender<Event>,
) -> Result<()>
fn run_command( &mut self, cmd: &str, cwd: &Path, bufid: usize, tx: Sender<Event>, ) -> Result<()>
Run an external command and append its output to the output buffer for
bufid from a
background thread. If the command is successfully spawned then a Child should be stored
for later resource cleanup and support for user initiated killing.Auto Trait Implementations§
impl Freeze for DefaultSystem
impl RefUnwindSafe for DefaultSystem
impl Send for DefaultSystem
impl Sync for DefaultSystem
impl Unpin for DefaultSystem
impl UnwindSafe for DefaultSystem
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more