Trait io_providers::Io [−][src]
pub trait Io { type E: Env; type F: Fs; type S: StdStreams; fn env(&self) -> &Self::E; fn env_mut(&mut self) -> &mut Self::E; fn fs(&self) -> &Self::F; fn fs_mut(&mut self) -> &mut Self::F; fn std_streams(&mut self) -> &mut Self::S; }
Provides access to the process environment, filesystem, and standard streams.
See env::Env
,
std_streams::StdStreams
and
fs::Fs
for details.
Associated Types
Required Methods
fn env(&self) -> &Self::E
Gets a reference to the env::Env
provider.
fn env_mut(&mut self) -> &mut Self::E
Gets a mutable reference to the env::Env
provider.
fn fs(&self) -> &Self::F
Gets a reference to the fs::Fs
provider.
fn fs_mut(&mut self) -> &mut Self::F
Gets a mutable reference to the fs::Fs
provider.
fn std_streams(&mut self) -> &mut Self::S
Gets a mutable reference to the std_streams::StdStreams
.
Implementors
impl Io for NativeIo type E = NativeEnv; type F = NativeFs; type S = NativeStdStreams;
impl Io for SimulatedIo type E = SimulatedEnv; type F = TempFs; type S = SimulatedStdStreams;