pub struct LocalSystem;Trait Implementations§
Source§impl Debug for LocalSystem
impl Debug for LocalSystem
Source§impl System for LocalSystem
impl System for LocalSystem
type Error = Error
type CommandError = Error
fn path_exists(&self, path: &Path) -> Result<bool, Self::Error>
fn path_is_dir(&self, path: &Path) -> Result<bool, Self::Error>
fn file_contents(&self, path: &Path) -> Result<Vec<u8>, Self::Error>
fn put_file_contents( &self, path: &Path, contents: &[u8], ) -> Result<(), Self::Error>
fn execute_command( &self, path: &str, args: &[&str], ) -> Result<CommandResult, Self::Error>
fn copy_file(&mut self, from: &Path, to: &Path) -> Result<(), Self::Error>
fn make_dir(&mut self, path: &Path) -> Result<(), Self::Error>
fn make_dir_all(&mut self, path: &Path) -> Result<(), Self::Error>
fn dir_is_empty(&mut self, path: &Path) -> Result<bool, Self::Error>
fn remove_dir(&mut self, path: &Path) -> Result<(), Self::Error>
fn remove_file(&mut self, path: &Path) -> Result<(), Self::Error>
fn get_user(&mut self, name: &str) -> Result<Option<()>, Self::Error>
fn execute_command_with_input( &self, path: &str, args: &[&str], input: &[u8], ) -> Result<CommandResult, Self::CommandError>
fn chmod(&mut self, path: &Path, mode: u32) -> Result<(), Self::Error>
fn read_dir(&mut self, path: &Path) -> Result<Vec<String>, Self::Error>
Auto Trait Implementations§
impl Freeze for LocalSystem
impl RefUnwindSafe for LocalSystem
impl Send for LocalSystem
impl Sync for LocalSystem
impl Unpin for LocalSystem
impl UnwindSafe for LocalSystem
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more