Struct WasiFilesystemCtxView

Source
pub struct WasiFilesystemCtxView<'a> {
    pub ctx: &'a mut WasiFilesystemCtx,
    pub table: &'a mut ResourceTable,
}

Fields§

§ctx: &'a mut WasiFilesystemCtx§table: &'a mut ResourceTable

Trait Implementations§

Source§

impl Host for WasiFilesystemCtxView<'_>

Source§

fn convert_error_code(&mut self, err: FsError) -> Result<ErrorCode>

Source§

fn filesystem_error_code( &mut self, err: Resource<Error>, ) -> Result<Option<ErrorCode>>

Attempts to extract a filesystem-related error-code from the stream error provided. Read more
Source§

impl Host for WasiFilesystemCtxView<'_>

Source§

fn get_directories(&mut self) -> Result<Vec<(Resource<Descriptor>, String)>>

Return the set of preopened directories, and their paths.
Source§

impl Host for WasiFilesystemCtxView<'_>

Source§

fn convert_error_code(&mut self, err: FsError) -> Result<ErrorCode>

Source§

fn filesystem_error_code( &mut self, err: Resource<Error>, ) -> Result<Option<ErrorCode>>

Attempts to extract a filesystem-related error-code from the stream error provided. Read more
Source§

impl HostDescriptor for WasiFilesystemCtxView<'_>

Source§

fn advise( &mut self, fd: Resource<Descriptor>, offset: Filesize, len: Filesize, advice: Advice, ) -> FsResult<()>

Provide file advisory information on a descriptor. Read more
Source§

fn sync_data(&mut self, fd: Resource<Descriptor>) -> FsResult<()>

Synchronize the data of a file to disk. Read more
Source§

fn get_flags(&mut self, fd: Resource<Descriptor>) -> FsResult<DescriptorFlags>

Get flags associated with a descriptor. Read more
Source§

fn get_type(&mut self, fd: Resource<Descriptor>) -> FsResult<DescriptorType>

Get the dynamic type of a descriptor. Read more
Source§

fn set_size(&mut self, fd: Resource<Descriptor>, size: Filesize) -> FsResult<()>

Adjust the size of an open file. If this increases the file’s size, the extra bytes are filled with zeros. Read more
Source§

fn set_times( &mut self, fd: Resource<Descriptor>, atim: NewTimestamp, mtim: NewTimestamp, ) -> FsResult<()>

Adjust the timestamps of an open file or directory. Read more
Source§

fn read( &mut self, fd: Resource<Descriptor>, len: Filesize, offset: Filesize, ) -> FsResult<(Vec<u8>, bool)>

Read from a descriptor, without using and updating the descriptor’s offset. Read more
Source§

fn write( &mut self, fd: Resource<Descriptor>, buf: Vec<u8>, offset: Filesize, ) -> FsResult<Filesize>

Write to a descriptor, without using and updating the descriptor’s offset. Read more
Source§

fn read_directory( &mut self, fd: Resource<Descriptor>, ) -> FsResult<Resource<DirectoryEntryStream>>

Read directory entries from a directory. Read more
Source§

fn sync(&mut self, fd: Resource<Descriptor>) -> FsResult<()>

Synchronize the data and metadata of a file to disk. Read more
Source§

fn create_directory_at( &mut self, fd: Resource<Descriptor>, path: String, ) -> FsResult<()>

Create a directory. Read more
Source§

fn stat(&mut self, fd: Resource<Descriptor>) -> FsResult<DescriptorStat>

Return the attributes of an open file or directory. Read more
Source§

fn stat_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, ) -> FsResult<DescriptorStat>

Return the attributes of a file or directory. Read more
Source§

fn set_times_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, atim: NewTimestamp, mtim: NewTimestamp, ) -> FsResult<()>

Adjust the timestamps of a file or directory. Read more
Create a hard link. Read more
Source§

fn open_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, oflags: OpenFlags, flags: DescriptorFlags, ) -> FsResult<Resource<Descriptor>>

Open a file or directory. Read more
Source§

fn drop(&mut self, fd: Resource<Descriptor>) -> Result<()>

Read the contents of a symbolic link. Read more
Source§

fn remove_directory_at( &mut self, fd: Resource<Descriptor>, path: String, ) -> FsResult<()>

Remove a directory. Read more
Source§

fn rename_at( &mut self, fd: Resource<Descriptor>, old_path: String, new_fd: Resource<Descriptor>, new_path: String, ) -> FsResult<()>

Rename a filesystem object. Read more
Create a symbolic link (also known as a “symlink”). Read more
Unlink a filesystem object that is not a directory. Read more
Source§

fn read_via_stream( &mut self, fd: Resource<Descriptor>, offset: Filesize, ) -> FsResult<Resource<InputStream>>

Return a stream for reading from a file, if available. Read more
Source§

fn write_via_stream( &mut self, fd: Resource<Descriptor>, offset: Filesize, ) -> FsResult<Resource<OutputStream>>

Return a stream for writing to a file, if available. Read more
Source§

fn append_via_stream( &mut self, fd: Resource<Descriptor>, ) -> FsResult<Resource<OutputStream>>

Return a stream for appending to a file, if available. Read more
Source§

fn is_same_object( &mut self, a: Resource<Descriptor>, b: Resource<Descriptor>, ) -> Result<bool>

Test whether two descriptors refer to the same filesystem object. Read more
Source§

fn metadata_hash( &mut self, fd: Resource<Descriptor>, ) -> FsResult<MetadataHashValue>

Return a hash of the metadata associated with a filesystem object referred to by a descriptor. Read more
Source§

fn metadata_hash_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, ) -> FsResult<MetadataHashValue>

Return a hash of the metadata associated with a filesystem object referred to by a directory descriptor and a relative path. Read more
Source§

impl HostDescriptor for WasiFilesystemCtxView<'_>

Source§

async fn advise( &mut self, fd: Resource<Descriptor>, offset: Filesize, len: Filesize, advice: Advice, ) -> FsResult<()>

Provide file advisory information on a descriptor. Read more
Source§

async fn sync_data(&mut self, fd: Resource<Descriptor>) -> FsResult<()>

Synchronize the data of a file to disk. Read more
Source§

async fn get_flags( &mut self, fd: Resource<Descriptor>, ) -> FsResult<DescriptorFlags>

Get flags associated with a descriptor. Read more
Source§

async fn get_type( &mut self, fd: Resource<Descriptor>, ) -> FsResult<DescriptorType>

Get the dynamic type of a descriptor. Read more
Source§

async fn set_size( &mut self, fd: Resource<Descriptor>, size: Filesize, ) -> FsResult<()>

Adjust the size of an open file. If this increases the file’s size, the extra bytes are filled with zeros. Read more
Source§

async fn set_times( &mut self, fd: Resource<Descriptor>, atim: NewTimestamp, mtim: NewTimestamp, ) -> FsResult<()>

Adjust the timestamps of an open file or directory. Read more
Source§

async fn read( &mut self, fd: Resource<Descriptor>, len: Filesize, offset: Filesize, ) -> FsResult<(Vec<u8>, bool)>

Read from a descriptor, without using and updating the descriptor’s offset. Read more
Source§

async fn write( &mut self, fd: Resource<Descriptor>, buf: Vec<u8>, offset: Filesize, ) -> FsResult<Filesize>

Write to a descriptor, without using and updating the descriptor’s offset. Read more
Source§

async fn read_directory( &mut self, fd: Resource<Descriptor>, ) -> FsResult<Resource<DirectoryEntryStream>>

Read directory entries from a directory. Read more
Source§

async fn sync(&mut self, fd: Resource<Descriptor>) -> FsResult<()>

Synchronize the data and metadata of a file to disk. Read more
Source§

async fn create_directory_at( &mut self, fd: Resource<Descriptor>, path: String, ) -> FsResult<()>

Create a directory. Read more
Source§

async fn stat(&mut self, fd: Resource<Descriptor>) -> FsResult<DescriptorStat>

Return the attributes of an open file or directory. Read more
Source§

async fn stat_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, ) -> FsResult<DescriptorStat>

Return the attributes of a file or directory. Read more
Source§

async fn set_times_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, atim: NewTimestamp, mtim: NewTimestamp, ) -> FsResult<()>

Adjust the timestamps of a file or directory. Read more
Create a hard link. Read more
Source§

async fn open_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, oflags: OpenFlags, flags: DescriptorFlags, ) -> FsResult<Resource<Descriptor>>

Open a file or directory. Read more
Source§

fn drop(&mut self, fd: Resource<Descriptor>) -> Result<()>

Read the contents of a symbolic link. Read more
Source§

async fn remove_directory_at( &mut self, fd: Resource<Descriptor>, path: String, ) -> FsResult<()>

Remove a directory. Read more
Source§

async fn rename_at( &mut self, fd: Resource<Descriptor>, old_path: String, new_fd: Resource<Descriptor>, new_path: String, ) -> FsResult<()>

Rename a filesystem object. Read more
Create a symbolic link (also known as a “symlink”). Read more
Unlink a filesystem object that is not a directory. Read more
Source§

fn read_via_stream( &mut self, fd: Resource<Descriptor>, offset: Filesize, ) -> FsResult<Resource<DynInputStream>>

Return a stream for reading from a file, if available. Read more
Source§

fn write_via_stream( &mut self, fd: Resource<Descriptor>, offset: Filesize, ) -> FsResult<Resource<DynOutputStream>>

Return a stream for writing to a file, if available. Read more
Source§

fn append_via_stream( &mut self, fd: Resource<Descriptor>, ) -> FsResult<Resource<DynOutputStream>>

Return a stream for appending to a file, if available. Read more
Source§

async fn is_same_object( &mut self, a: Resource<Descriptor>, b: Resource<Descriptor>, ) -> Result<bool>

Test whether two descriptors refer to the same filesystem object. Read more
Source§

async fn metadata_hash( &mut self, fd: Resource<Descriptor>, ) -> FsResult<MetadataHashValue>

Return a hash of the metadata associated with a filesystem object referred to by a descriptor. Read more
Source§

async fn metadata_hash_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, ) -> FsResult<MetadataHashValue>

Return a hash of the metadata associated with a filesystem object referred to by a directory descriptor and a relative path. Read more
Source§

impl HostDirectoryEntryStream for WasiFilesystemCtxView<'_>

Source§

fn read_directory_entry( &mut self, stream: Resource<DirectoryEntryStream>, ) -> FsResult<Option<DirectoryEntry>>

Read a single directory entry from a directory-entry-stream.
Source§

fn drop(&mut self, stream: Resource<DirectoryEntryStream>) -> Result<()>

Source§

impl HostDirectoryEntryStream for WasiFilesystemCtxView<'_>

Source§

async fn read_directory_entry( &mut self, stream: Resource<DirectoryEntryStream>, ) -> FsResult<Option<DirectoryEntry>>

Read a single directory entry from a directory-entry-stream.
Source§

fn drop(&mut self, stream: Resource<DirectoryEntryStream>) -> Result<()>

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.

§

impl<T> GetSetFdFlags for T

§

fn get_fd_flags(&self) -> Result<FdFlags, Error>
where T: AsFilelike,

Query the “status” flags for the self file descriptor.
§

fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>
where T: AsFilelike,

Create a new SetFdFlags value for use with set_fd_flags. Read more
§

fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>
where T: AsFilelike,

Set the “status” flags for the self file descriptor. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Pointee for T

§

type Pointer = u32

§

fn debug( pointer: <T as Pointee>::Pointer, f: &mut Formatter<'_>, ) -> Result<(), Error>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T