async_wasi::snapshots::common::vfs::impls

Struct MemoryFile

Source
pub struct MemoryFile { /* private fields */ }

Trait Implementations§

Source§

impl Debug for MemoryFile

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for MemoryFile

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl From<Vec<u8>> for MemoryFile

Source§

fn from(value: Vec<u8>) -> Self

Converts to this type from the input type.
Source§

impl WasiFile for MemoryFile

Source§

fn fd_read(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Errno>

Source§

fn fd_pread( &mut self, bufs: &mut [IoSliceMut<'_>], offset: __wasi_filesize_t, ) -> Result<usize, Errno>

Source§

fn fd_write(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Errno>

Source§

fn fd_pwrite( &mut self, bufs: &[IoSlice<'_>], offset: __wasi_filesize_t, ) -> Result<usize, Errno>

Source§

fn fd_seek( &mut self, offset: __wasi_filedelta_t, whence: Type, ) -> Result<__wasi_filesize_t, Errno>

Source§

fn fd_tell(&mut self) -> Result<__wasi_filesize_t, Errno>

Source§

fn fd_advise( &mut self, offset: __wasi_filesize_t, len: __wasi_filesize_t, advice: Advice, ) -> Result<(), Errno>

Source§

fn fd_allocate( &mut self, offset: __wasi_filesize_t, len: __wasi_filesize_t, ) -> Result<(), Errno>

Source§

fn fd_datasync(&mut self) -> Result<(), Errno>

Source§

fn fd_sync(&mut self) -> Result<(), Errno>

Source§

impl WasiNode for MemoryFile

Source§

impl WasiVirtualFile for MemoryFile

Source§

fn create(ino: usize) -> Self

Source§

fn set_ino(&mut self, ino: usize)

Source§

fn is_open(&self) -> bool

Source§

fn open(&mut self)

Source§

fn close(&mut self) -> usize

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.