BashRunner

Struct BashRunner 

Source
pub struct BashRunner<E, P> { /* private fields */ }

Implementations§

Source§

impl<E, P> BashRunner<E, P>

Source

pub fn new(workspace_root: PathBuf, executor: E, policy: P) -> Result<Self>

Source

pub fn from_workspace_paths<W>( paths: &W, executor: E, policy: P, ) -> Result<Self>
where W: WorkspacePaths,

Source

pub fn workspace_root(&self) -> &Path

Source

pub fn working_dir(&self) -> &Path

Source

pub fn shell_kind(&self) -> ShellKind

Source

pub fn cd(&mut self, path: &str) -> Result<()>

Source

pub fn ls(&self, path: Option<&str>, show_hidden: bool) -> Result<String>

Source

pub fn pwd(&self) -> Result<String>

Source

pub fn mkdir(&self, path: &str, parents: bool) -> Result<()>

Source

pub fn rm(&self, path: &str, recursive: bool, force: bool) -> Result<()>

Source

pub fn cp(&self, source: &str, dest: &str, recursive: bool) -> Result<()>

Source

pub fn mv(&self, source: &str, dest: &str) -> Result<()>

Source

pub fn grep( &self, pattern: &str, path: Option<&str>, recursive: bool, ) -> Result<String>

Auto Trait Implementations§

§

impl<E, P> Freeze for BashRunner<E, P>
where E: Freeze, P: Freeze,

§

impl<E, P> RefUnwindSafe for BashRunner<E, P>

§

impl<E, P> Send for BashRunner<E, P>
where E: Send, P: Send,

§

impl<E, P> Sync for BashRunner<E, P>
where E: Sync, P: Sync,

§

impl<E, P> Unpin for BashRunner<E, P>
where E: Unpin, P: Unpin,

§

impl<E, P> UnwindSafe for BashRunner<E, P>
where E: UnwindSafe, P: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.