Struct grebedb::vfs::ReadOnlyVfs [−][src]
Wrapper that allows only read operations.
Implementations
impl ReadOnlyVfs
[src]
pub fn new(inner: Box<dyn Vfs + Sync + Send>) -> Self
[src]
Wrap a VFS.
pub fn into_inner(self) -> Box<dyn Vfs + Sync + Send>
[src]
Return the wrapped VFS.
Trait Implementations
impl Debug for ReadOnlyVfs
[src]
impl Vfs for ReadOnlyVfs
[src]
fn lock(&mut self, path: &str) -> Result<(), Error>
[src]
fn unlock(&mut self, path: &str) -> Result<(), Error>
[src]
fn read(&self, path: &str) -> Result<Vec<u8>, Error>
[src]
fn write(
&mut self,
_path: &str,
_data: &[u8],
_sync_option: VfsSyncOption
) -> Result<(), Error>
[src]
&mut self,
_path: &str,
_data: &[u8],
_sync_option: VfsSyncOption
) -> Result<(), Error>
fn remove_file(&mut self, _path: &str) -> Result<(), Error>
[src]
fn read_dir(&self, path: &str) -> Result<Vec<String>, Error>
[src]
fn create_dir(&mut self, _path: &str) -> Result<(), Error>
[src]
fn remove_dir(&mut self, _path: &str) -> Result<(), Error>
[src]
fn rename_file(&mut self, _old_path: &str, _new_path: &str) -> Result<(), Error>
[src]
fn is_dir(&self, path: &str) -> Result<bool, Error>
[src]
fn exists(&self, path: &str) -> Result<bool, Error>
[src]
fn create_dir_all(&mut self, path: &str) -> Result<(), Error>
[src]
fn remove_empty_dir_all(&mut self, path: &str) -> Result<(), Error>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ReadOnlyVfs
impl Send for ReadOnlyVfs
impl Sync for ReadOnlyVfs
impl Unpin for ReadOnlyVfs
impl !UnwindSafe for ReadOnlyVfs
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,