pub struct DeviceLayer<V> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<V: Clone> Clone for DeviceLayer<V>
impl<V: Clone> Clone for DeviceLayer<V>
Source§fn clone(&self) -> DeviceLayer<V>
fn clone(&self) -> DeviceLayer<V>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<V: Debug> Debug for DeviceLayer<V>
impl<V: Debug> Debug for DeviceLayer<V>
Source§impl<V: VirtualFileSystem> VirtualFileSystem for DeviceLayer<V>
impl<V: VirtualFileSystem> VirtualFileSystem for DeviceLayer<V>
fn read_file(&mut self, path: &str) -> VfsResult<Vec<u8>>
fn read_dir(&mut self, path: &str) -> VfsResult<Vec<String>>
fn read_dir_limited( &mut self, path: &str, max_entries: usize, ) -> VfsResult<Vec<String>>
fn read_dir_with_types(&mut self, path: &str) -> VfsResult<Vec<VirtualDirEntry>>
Source§fn write_file(
&mut self,
path: &str,
content: impl Into<Vec<u8>>,
) -> VfsResult<()>
fn write_file( &mut self, path: &str, content: impl Into<Vec<u8>>, ) -> VfsResult<()>
Writes caller-owned bytes into the filesystem. Read more
fn create_file_exclusive( &mut self, path: &str, content: impl Into<Vec<u8>>, ) -> VfsResult<()>
Source§fn append_file(
&mut self,
path: &str,
content: impl Into<Vec<u8>>,
) -> VfsResult<u64>
fn append_file( &mut self, path: &str, content: impl Into<Vec<u8>>, ) -> VfsResult<u64>
Appends caller-owned bytes into the filesystem after checking that the
in-memory file can grow without overflowing addressable memory.
fn create_dir(&mut self, path: &str) -> VfsResult<()>
fn mkdir(&mut self, path: &str, recursive: bool) -> VfsResult<()>
fn exists(&self, path: &str) -> bool
fn stat(&mut self, path: &str) -> VfsResult<VirtualStat>
fn remove_file(&mut self, path: &str) -> VfsResult<()>
fn remove_dir(&mut self, path: &str) -> VfsResult<()>
fn rename(&mut self, old_path: &str, new_path: &str) -> VfsResult<()>
fn realpath(&self, path: &str) -> VfsResult<String>
fn symlink(&mut self, target: &str, link_path: &str) -> VfsResult<()>
fn read_link(&self, path: &str) -> VfsResult<String>
fn lstat(&self, path: &str) -> VfsResult<VirtualStat>
fn link(&mut self, old_path: &str, new_path: &str) -> VfsResult<()>
fn chmod(&mut self, path: &str, mode: u32) -> VfsResult<()>
fn chown(&mut self, path: &str, uid: u32, gid: u32) -> VfsResult<()>
fn utimes(&mut self, path: &str, atime_ms: u64, mtime_ms: u64) -> VfsResult<()>
fn utimes_spec( &mut self, path: &str, atime: VirtualUtimeSpec, mtime: VirtualUtimeSpec, follow_symlinks: bool, ) -> VfsResult<()>
Source§fn truncate(&mut self, path: &str, length: u64) -> VfsResult<()>
fn truncate(&mut self, path: &str, length: u64) -> VfsResult<()>
Resizes a file. VM resource policy must be enforced by the caller.
fn pread( &mut self, path: &str, offset: u64, length: usize, ) -> VfsResult<Vec<u8>>
fn read_text_file(&mut self, path: &str) -> VfsResult<String>
fn write_file_with_mode( &mut self, path: &str, content: impl Into<Vec<u8>>, mode: Option<u32>, ) -> VfsResult<()>
fn create_file_exclusive_with_mode( &mut self, path: &str, content: impl Into<Vec<u8>>, mode: Option<u32>, ) -> VfsResult<()>
fn create_dir_with_mode( &mut self, path: &str, mode: Option<u32>, ) -> VfsResult<()>
fn mkdir_with_mode( &mut self, path: &str, recursive: bool, mode: Option<u32>, ) -> VfsResult<()>
Auto Trait Implementations§
impl<V> Freeze for DeviceLayer<V>where
V: Freeze,
impl<V> RefUnwindSafe for DeviceLayer<V>where
V: RefUnwindSafe,
impl<V> Send for DeviceLayer<V>where
V: Send,
impl<V> Sync for DeviceLayer<V>where
V: Sync,
impl<V> Unpin for DeviceLayer<V>where
V: Unpin,
impl<V> UnsafeUnpin for DeviceLayer<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for DeviceLayer<V>where
V: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more