Struct LocalSystem

Source
pub struct LocalSystem;

Trait Implementations§

Source§

impl Debug for LocalSystem

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl System for LocalSystem

Source§

type Error = Error

Source§

type CommandError = Error

Source§

fn path_exists(&self, path: &Path) -> Result<bool, Self::Error>

Source§

fn path_is_dir(&self, path: &Path) -> Result<bool, Self::Error>

Source§

fn file_contents(&self, path: &Path) -> Result<Vec<u8>, Self::Error>

Source§

fn put_file_contents( &self, path: &Path, contents: &[u8], ) -> Result<(), Self::Error>

Source§

fn execute_command( &self, path: &str, args: &[&str], ) -> Result<CommandResult, Self::Error>

Source§

fn copy_file(&mut self, from: &Path, to: &Path) -> Result<(), Self::Error>

Source§

fn make_dir(&mut self, path: &Path) -> Result<(), Self::Error>

Source§

fn make_dir_all(&mut self, path: &Path) -> Result<(), Self::Error>

Source§

fn dir_is_empty(&mut self, path: &Path) -> Result<bool, Self::Error>

Source§

fn remove_dir(&mut self, path: &Path) -> Result<(), Self::Error>

Source§

fn remove_file(&mut self, path: &Path) -> Result<(), Self::Error>

Source§

fn get_user(&mut self, name: &str) -> Result<Option<()>, Self::Error>

Source§

fn execute_command_with_input( &self, path: &str, args: &[&str], input: &[u8], ) -> Result<CommandResult, Self::CommandError>

Source§

fn chmod(&mut self, path: &Path, mode: u32) -> Result<(), Self::Error>

Source§

fn read_dir(&mut self, path: &Path) -> Result<Vec<String>, Self::Error>

Auto Trait Implementations§

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Supports<T> for T

Source§

fn create_from(item: T) -> T

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DebugAny for T
where T: Any + Debug,

Source§

impl<T> UnsafeAny for T
where T: Any,