Struct RealIo

Source
pub struct RealIo();

Trait Implementations§

Source§

impl Default for RealIo

Source§

fn default() -> RealIo

Returns the “default value” for a type. Read more
Source§

impl Io for RealIo

Source§

type Args = Args

Source§

type Stdout = Stdout

Source§

type File = File

Source§

type Metadata = Metadata

Source§

type DirEntry = DirEntry

Source§

type Instant = Instant

Source§

fn args(&self) -> Self::Args

Source§

fn create(&self, path: &str) -> Result<Self::File>

Source§

fn open(&self, path: &str) -> Result<Self::File>

Source§

fn metadata(&self, path: &str) -> Result<Metadata>

Source§

fn read_dir(&self, path: &str) -> Result<Vec<Self::DirEntry>>

Source§

fn create_dir(&self, path: &str) -> Result<()>

Source§

fn stdout(&self) -> Self::Stdout

Source§

fn now(&self) -> Instant

Source§

fn current_dir(&self) -> Result<String>

Source§

fn set_current_dir(&self, path: &str) -> Result<()>

Source§

fn read(&self, path: &str) -> Result<Vec<u8>, Error>

Source§

fn read_to_string(&self, path: &str) -> Result<String, Error>

Source§

fn write(&self, path: &str, data: &[u8]) -> Result<(), Error>

Source§

fn create_dir_recursively(&self, path: &str) -> Result<(), Error>

Source§

fn write_recursively(&self, path: &str, data: &[u8]) -> Result<(), Error>

Source§

fn read_dir_type( &self, path: &str, is_dir: bool, ) -> Result<Vec<Self::DirEntry>, Error>

Auto Trait Implementations§

§

impl Freeze for RealIo

§

impl RefUnwindSafe for RealIo

§

impl Send for RealIo

§

impl Sync for RealIo

§

impl Unpin for RealIo

§

impl UnwindSafe for RealIo

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.