pub trait System: Debug {
// Required methods
fn set_clipboard(&mut self, s: &str) -> Result<()>;
fn read_clipboard(&self) -> Result<String>;
// Provided methods
fn run_command_blocking<I, S>(
&self,
cmd: &str,
args: I,
cwd: &Path,
bufid: usize,
) -> Result<String>
where I: IntoIterator<Item = S>,
S: AsRef<OsStr> { ... }
fn run_command<I, S>(
&self,
cmd: &str,
args: I,
cwd: &Path,
bufid: usize,
tx: Sender<Event>,
)
where I: IntoIterator<Item = S>,
S: AsRef<OsStr> { ... }
fn pipe_through_command<I, S>(
&self,
cmd: &str,
args: I,
input: &str,
cwd: &Path,
bufid: usize,
) -> Result<String>
where I: IntoIterator<Item = S>,
S: AsRef<OsStr> { ... }
}
Expand description
Wrapper around storing system interactions
Required Methods§
Sourcefn set_clipboard(&mut self, s: &str) -> Result<()>
fn set_clipboard(&mut self, s: &str) -> Result<()>
Set the clipboard to the given string
Sourcefn read_clipboard(&self) -> Result<String>
fn read_clipboard(&self) -> Result<String>
Read the current contents of the clipboard
Provided Methods§
Sourcefn run_command_blocking<I, S>(
&self,
cmd: &str,
args: I,
cwd: &Path,
bufid: usize,
) -> Result<String>
fn run_command_blocking<I, S>( &self, cmd: &str, args: I, cwd: &Path, bufid: usize, ) -> Result<String>
Run an external command and collect its output.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.