pub struct DefaultFileSystem;
Trait Implementations§
Source§impl FileSystem for DefaultFileSystem
impl FileSystem for DefaultFileSystem
type Handle = LogFd
type Reader = LogFile
type Writer = LogFile
fn create<P: AsRef<Path>>(&self, path: P) -> IoResult<Self::Handle>
fn open<P: AsRef<Path>>( &self, path: P, perm: Permission, ) -> IoResult<Self::Handle>
fn delete<P: AsRef<Path>>(&self, path: P) -> IoResult<()>
fn rename<P: AsRef<Path>>(&self, src_path: P, dst_path: P) -> IoResult<()>
fn new_reader(&self, handle: Arc<Self::Handle>) -> IoResult<Self::Reader>
fn new_writer(&self, handle: Arc<Self::Handle>) -> IoResult<Self::Writer>
Source§fn reuse<P: AsRef<Path>>(&self, src_path: P, dst_path: P) -> Result<()>
fn reuse<P: AsRef<Path>>(&self, src_path: P, dst_path: P) -> Result<()>
Reuses file at
src_path
as a new file at dst_path
. The default
implementation simply renames the file.fn reuse_and_open<P: AsRef<Path>>( &self, src_path: P, dst_path: P, ) -> Result<Self::Handle>
Auto Trait Implementations§
impl Freeze for DefaultFileSystem
impl RefUnwindSafe for DefaultFileSystem
impl Send for DefaultFileSystem
impl Sync for DefaultFileSystem
impl Unpin for DefaultFileSystem
impl UnwindSafe for DefaultFileSystem
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