[−][src]Struct wasi_common::virtfs::InMemoryFile
An InMemoryFile
is a shared handle to some underlying data. The relationship is analagous to
a filesystem wherein a file descriptor is one view into a possibly-shared underlying collection
of data and permissions on a filesystem.
Implementations
impl InMemoryFile
[src]
pub fn memory_backed() -> Self
[src]
pub fn new(contents: Box<dyn FileContents>) -> Self
[src]
Trait Implementations
impl Handle for InMemoryFile
[src]
fn as_any(&self) -> &dyn Any
[src]
fn try_clone(&self) -> Result<Box<dyn Handle>>
[src]
fn get_file_type(&self) -> Filetype
[src]
fn get_rights(&self) -> HandleRights
[src]
fn set_rights(&self, rights: HandleRights)
[src]
fn advise(
&self,
_advice: Advice,
_offset: Filesize,
_len: Filesize
) -> Result<()>
[src]
&self,
_advice: Advice,
_offset: Filesize,
_len: Filesize
) -> Result<()>
fn allocate(&self, offset: Filesize, len: Filesize) -> Result<()>
[src]
fn fdstat_get(&self) -> Result<Fdflags>
[src]
fn fdstat_set_flags(&self, fdflags: Fdflags) -> Result<()>
[src]
fn filestat_get(&self) -> Result<Filestat>
[src]
fn filestat_set_size(&self, st_size: Filesize) -> Result<()>
[src]
fn preadv(&self, buf: &mut [IoSliceMut], offset: Filesize) -> Result<usize>
[src]
fn pwritev(&self, buf: &[IoSlice], offset: Filesize) -> Result<usize>
[src]
fn read_vectored(&self, iovs: &mut [IoSliceMut]) -> Result<usize>
[src]
fn seek(&self, offset: SeekFrom) -> Result<Filesize>
[src]
fn write_vectored(&self, iovs: &[IoSlice]) -> Result<usize>
[src]
fn create_directory(&self, _path: &str) -> Result<()>
[src]
fn openat(
&self,
path: &str,
read: bool,
write: bool,
oflags: Oflags,
fd_flags: Fdflags
) -> Result<Box<dyn Handle>>
[src]
&self,
path: &str,
read: bool,
write: bool,
oflags: Oflags,
fd_flags: Fdflags
) -> Result<Box<dyn Handle>>
fn link(
&self,
_old_path: &str,
_new_handle: Box<dyn Handle>,
_new_path: &str,
_follow: bool
) -> Result<()>
[src]
&self,
_old_path: &str,
_new_handle: Box<dyn Handle>,
_new_path: &str,
_follow: bool
) -> Result<()>
fn readlink(&self, _path: &str, _buf: &mut [u8]) -> Result<usize>
[src]
fn readlinkat(&self, _path: &str) -> Result<String>
[src]
fn rename(
&self,
_old_path: &str,
_new_handle: Box<dyn Handle>,
_new_path: &str
) -> Result<()>
[src]
&self,
_old_path: &str,
_new_handle: Box<dyn Handle>,
_new_path: &str
) -> Result<()>
fn remove_directory(&self, _path: &str) -> Result<()>
[src]
fn symlink(&self, _old_path: &str, _new_path: &str) -> Result<()>
[src]
fn unlink_file(&self, _path: &str) -> Result<()>
[src]
fn is_directory(&self) -> bool
[src]
fn is_tty(&self) -> bool
[src]
fn datasync(&self) -> Result<()>
[src]
fn filestat_set_times(
&self,
_atim: Timestamp,
_mtim: Timestamp,
_fst_flags: Fstflags
) -> Result<()>
[src]
&self,
_atim: Timestamp,
_mtim: Timestamp,
_fst_flags: Fstflags
) -> Result<()>
fn readdir<'a>(
&'a self,
_cookie: Dircookie
) -> Result<Box<dyn Iterator<Item = Result<(Dirent, String)>> + 'a>>
[src]
&'a self,
_cookie: Dircookie
) -> Result<Box<dyn Iterator<Item = Result<(Dirent, String)>> + 'a>>
fn sync(&self) -> Result<()>
[src]
fn filestat_get_at(&self, _path: &str, _follow: bool) -> Result<Filestat>
[src]
fn filestat_set_times_at(
&self,
_path: &str,
_atim: Timestamp,
_mtim: Timestamp,
_fst_flags: Fstflags,
_follow: bool
) -> Result<()>
[src]
&self,
_path: &str,
_atim: Timestamp,
_mtim: Timestamp,
_fst_flags: Fstflags,
_follow: bool
) -> Result<()>
Auto Trait Implementations
impl !RefUnwindSafe for InMemoryFile
impl !Send for InMemoryFile
impl !Sync for InMemoryFile
impl Unpin for InMemoryFile
impl !UnwindSafe for InMemoryFile
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,
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> Pointee for T
[src]
type Pointer = u32
fn debug(
pointer: <T as Pointee>::Pointer,
f: &mut Formatter
) -> Result<(), Error>
[src]
pointer: <T as Pointee>::Pointer,
f: &mut Formatter
) -> Result<(), Error>
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.
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>,