pub struct StdIO(/* private fields */);Trait Implementations§
Source§impl Io for StdIO
impl Io for StdIO
type File = File
type TempFile = File
type Rng = ThreadRng
fn create_dir_all(&self, path: &Path) -> Result<()>
Source§fn open(
&self,
create_new: bool,
read: bool,
write: bool,
path: &Path,
) -> Result<Self::File>
fn open( &self, create_new: bool, read: bool, write: bool, path: &Path, ) -> Result<Self::File>
TODO: when adding an async variant make sure all places where async is needed are replaced
fn tempfile(&self) -> Result<Self::TempFile>
fn now(&self) -> DateTime<Utc>
fn uuid(&self) -> Uuid
fn hard_link(&self, src: &Path, dst: &Path) -> Result<()>
fn with_rng<F, R>(&self, f: F) -> R
async fn remove_file_async(&self, path: &Path) -> Result<()>
impl Copy for StdIO
Auto Trait Implementations§
impl Freeze for StdIO
impl RefUnwindSafe for StdIO
impl Send for StdIO
impl Sync for StdIO
impl Unpin for StdIO
impl UnwindSafe for StdIO
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.