pub struct RuntimeView<T: NestedView> {
pub table: ResourceTable,
pub ctx: WasiCtx,
pub nested_view: T,
}Fields§
§table: ResourceTable§ctx: WasiCtx§nested_view: TTrait Implementations§
Source§impl<T> WasiView for RuntimeView<T>where
T: Send + NestedView,
impl<T> WasiView for RuntimeView<T>where
T: Send + NestedView,
Auto Trait Implementations§
impl<T> Freeze for RuntimeView<T>where
T: Freeze,
impl<T> !RefUnwindSafe for RuntimeView<T>
impl<T> Send for RuntimeView<T>
impl<T> !Sync for RuntimeView<T>
impl<T> Unpin for RuntimeView<T>where
T: Unpin,
impl<T> !UnwindSafe for RuntimeView<T>
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
Query the “status” flags for the
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
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 moreSource§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
Source§fn get_terminal_stdin(
&mut self,
) -> Result<Option<Resource<TerminalInput>>, Error>
fn get_terminal_stdin( &mut self, ) -> Result<Option<Resource<TerminalInput>>, Error>
If stdin is connected to a terminal, return a
terminal-input handle
allowing further interaction with it.Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
Source§fn get_terminal_stdout(
&mut self,
) -> Result<Option<Resource<TerminalOutput>>, Error>
fn get_terminal_stdout( &mut self, ) -> Result<Option<Resource<TerminalOutput>>, Error>
If stdout is connected to a terminal, return a
terminal-output handle
allowing further interaction with it.Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
Source§fn get_terminal_stderr(
&mut self,
) -> Result<Option<Resource<TerminalOutput>>, Error>
fn get_terminal_stderr( &mut self, ) -> Result<Option<Resource<TerminalOutput>>, Error>
If stderr is connected to a terminal, return a
terminal-output handle
allowing further interaction with it.Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
Source§fn resolution(&mut self) -> Result<u64, Error>
fn resolution(&mut self) -> Result<u64, Error>
Query the resolution of the clock. Returns the duration of time
corresponding to a clock tick.
Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
Source§fn get_directories(
&mut self,
) -> Result<Vec<(Resource<Descriptor>, String)>, Error>
fn get_directories( &mut self, ) -> Result<Vec<(Resource<Descriptor>, String)>, Error>
Return the set of preopened directories, and their path.
Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
fn convert_stream_error( &mut self, err: StreamError, ) -> Result<StreamError, Error>
Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
fn convert_stream_error( &mut self, err: StreamError, ) -> Result<StreamError, Error>
Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
fn convert_error_code( &mut self, error: TrappableError<ErrorCode>, ) -> Result<ErrorCode, Error>
Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
Source§fn create_udp_socket(
&mut self,
address_family: IpAddressFamily,
) -> Result<Resource<UdpSocket>, TrappableError<ErrorCode>>
fn create_udp_socket( &mut self, address_family: IpAddressFamily, ) -> Result<Resource<UdpSocket>, TrappableError<ErrorCode>>
Create a new UDP socket. Read more
Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
Source§fn create_tcp_socket(
&mut self,
address_family: IpAddressFamily,
) -> Result<Resource<TcpSocket>, TrappableError<ErrorCode>>
fn create_tcp_socket( &mut self, address_family: IpAddressFamily, ) -> Result<Resource<TcpSocket>, TrappableError<ErrorCode>>
Create a new TCP socket. Read more
Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
Source§fn resolve_addresses(
&mut self,
network: Resource<Network>,
name: String,
) -> Result<Resource<ResolveAddressStream>, TrappableError<ErrorCode>>
fn resolve_addresses( &mut self, network: Resource<Network>, name: String, ) -> Result<Resource<ResolveAddressStream>, TrappableError<ErrorCode>>
Resolve an internet host name to a list of IP addresses. Read more
Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
fn get_stdout(&mut self) -> Result<Resource<Box<dyn HostOutputStream>>, Error>
Source§impl<T> Host for Twhere
T: WasiView,
impl<T> Host for Twhere
T: WasiView,
fn get_stderr(&mut self) -> Result<Resource<Box<dyn HostOutputStream>>, Error>
Source§impl<T> HostDescriptor for Twhere
T: HostDescriptor,
impl<T> HostDescriptor for Twhere
T: HostDescriptor,
Source§fn advise(
&mut self,
fd: Resource<Descriptor>,
offset: u64,
len: u64,
advice: Advice,
) -> Result<(), TrappableError<ErrorCode>>
fn advise( &mut self, fd: Resource<Descriptor>, offset: u64, len: u64, advice: Advice, ) -> Result<(), TrappableError<ErrorCode>>
Provide file advisory information on a descriptor. Read more
Source§fn sync_data(
&mut self,
fd: Resource<Descriptor>,
) -> Result<(), TrappableError<ErrorCode>>
fn sync_data( &mut self, fd: Resource<Descriptor>, ) -> Result<(), TrappableError<ErrorCode>>
Synchronize the data of a file to disk. Read more
Source§fn get_flags(
&mut self,
fd: Resource<Descriptor>,
) -> Result<DescriptorFlags, TrappableError<ErrorCode>>
fn get_flags( &mut self, fd: Resource<Descriptor>, ) -> Result<DescriptorFlags, TrappableError<ErrorCode>>
Get flags associated with a descriptor. Read more
Source§fn get_type(
&mut self,
fd: Resource<Descriptor>,
) -> Result<DescriptorType, TrappableError<ErrorCode>>
fn get_type( &mut self, fd: Resource<Descriptor>, ) -> Result<DescriptorType, TrappableError<ErrorCode>>
Get the dynamic type of a descriptor. Read more
Source§fn set_size(
&mut self,
fd: Resource<Descriptor>,
size: u64,
) -> Result<(), TrappableError<ErrorCode>>
fn set_size( &mut self, fd: Resource<Descriptor>, size: u64, ) -> Result<(), TrappableError<ErrorCode>>
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,
) -> Result<(), TrappableError<ErrorCode>>
fn set_times( &mut self, fd: Resource<Descriptor>, atim: NewTimestamp, mtim: NewTimestamp, ) -> Result<(), TrappableError<ErrorCode>>
Adjust the timestamps of an open file or directory. Read more
Source§fn read(
&mut self,
fd: Resource<Descriptor>,
len: u64,
offset: u64,
) -> Result<(Vec<u8>, bool), TrappableError<ErrorCode>>
fn read( &mut self, fd: Resource<Descriptor>, len: u64, offset: u64, ) -> Result<(Vec<u8>, bool), TrappableError<ErrorCode>>
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: u64,
) -> Result<u64, TrappableError<ErrorCode>>
fn write( &mut self, fd: Resource<Descriptor>, buf: Vec<u8>, offset: u64, ) -> Result<u64, TrappableError<ErrorCode>>
Write to a descriptor, without using and updating the descriptor’s offset. Read more
Source§fn read_directory(
&mut self,
fd: Resource<Descriptor>,
) -> Result<Resource<ReaddirIterator>, TrappableError<ErrorCode>>
fn read_directory( &mut self, fd: Resource<Descriptor>, ) -> Result<Resource<ReaddirIterator>, TrappableError<ErrorCode>>
Read directory entries from a directory. Read more
Source§fn sync(
&mut self,
fd: Resource<Descriptor>,
) -> Result<(), TrappableError<ErrorCode>>
fn sync( &mut self, fd: Resource<Descriptor>, ) -> Result<(), TrappableError<ErrorCode>>
Synchronize the data and metadata of a file to disk. Read more
Source§fn create_directory_at(
&mut self,
fd: Resource<Descriptor>,
path: String,
) -> Result<(), TrappableError<ErrorCode>>
fn create_directory_at( &mut self, fd: Resource<Descriptor>, path: String, ) -> Result<(), TrappableError<ErrorCode>>
Create a directory. Read more
Source§fn stat(
&mut self,
fd: Resource<Descriptor>,
) -> Result<DescriptorStat, TrappableError<ErrorCode>>
fn stat( &mut self, fd: Resource<Descriptor>, ) -> Result<DescriptorStat, TrappableError<ErrorCode>>
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,
) -> Result<DescriptorStat, TrappableError<ErrorCode>>
fn stat_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, ) -> Result<DescriptorStat, TrappableError<ErrorCode>>
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,
) -> Result<(), TrappableError<ErrorCode>>
fn set_times_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, atim: NewTimestamp, mtim: NewTimestamp, ) -> Result<(), TrappableError<ErrorCode>>
Adjust the timestamps of a file or directory. Read more
Source§fn link_at(
&mut self,
fd: Resource<Descriptor>,
old_path_flags: PathFlags,
old_path: String,
new_descriptor: Resource<Descriptor>,
new_path: String,
) -> Result<(), TrappableError<ErrorCode>>
fn link_at( &mut self, fd: Resource<Descriptor>, old_path_flags: PathFlags, old_path: String, new_descriptor: Resource<Descriptor>, new_path: String, ) -> Result<(), TrappableError<ErrorCode>>
Create a hard link. Read more
Source§fn open_at(
&mut self,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
oflags: OpenFlags,
flags: DescriptorFlags,
) -> Result<Resource<Descriptor>, TrappableError<ErrorCode>>
fn open_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, oflags: OpenFlags, flags: DescriptorFlags, ) -> Result<Resource<Descriptor>, TrappableError<ErrorCode>>
Open a file or directory. Read more
fn drop(&mut self, fd: Resource<Descriptor>) -> Result<(), Error>
Source§fn readlink_at(
&mut self,
fd: Resource<Descriptor>,
path: String,
) -> Result<String, TrappableError<ErrorCode>>
fn readlink_at( &mut self, fd: Resource<Descriptor>, path: String, ) -> Result<String, TrappableError<ErrorCode>>
Read the contents of a symbolic link. Read more
Source§fn remove_directory_at(
&mut self,
fd: Resource<Descriptor>,
path: String,
) -> Result<(), TrappableError<ErrorCode>>
fn remove_directory_at( &mut self, fd: Resource<Descriptor>, path: String, ) -> Result<(), TrappableError<ErrorCode>>
Remove a directory. Read more
Source§fn rename_at(
&mut self,
fd: Resource<Descriptor>,
old_path: String,
new_fd: Resource<Descriptor>,
new_path: String,
) -> Result<(), TrappableError<ErrorCode>>
fn rename_at( &mut self, fd: Resource<Descriptor>, old_path: String, new_fd: Resource<Descriptor>, new_path: String, ) -> Result<(), TrappableError<ErrorCode>>
Rename a filesystem object. Read more
Source§fn symlink_at(
&mut self,
fd: Resource<Descriptor>,
src_path: String,
dest_path: String,
) -> Result<(), TrappableError<ErrorCode>>
fn symlink_at( &mut self, fd: Resource<Descriptor>, src_path: String, dest_path: String, ) -> Result<(), TrappableError<ErrorCode>>
Create a symbolic link (also known as a “symlink”). Read more
Source§fn unlink_file_at(
&mut self,
fd: Resource<Descriptor>,
path: String,
) -> Result<(), TrappableError<ErrorCode>>
fn unlink_file_at( &mut self, fd: Resource<Descriptor>, path: String, ) -> Result<(), TrappableError<ErrorCode>>
Unlink a filesystem object that is not a directory. Read more
Source§fn read_via_stream(
&mut self,
fd: Resource<Descriptor>,
offset: u64,
) -> Result<Resource<InputStream>, TrappableError<ErrorCode>>
fn read_via_stream( &mut self, fd: Resource<Descriptor>, offset: u64, ) -> Result<Resource<InputStream>, TrappableError<ErrorCode>>
Return a stream for reading from a file, if available. Read more
Source§fn write_via_stream(
&mut self,
fd: Resource<Descriptor>,
offset: u64,
) -> Result<Resource<Box<dyn HostOutputStream>>, TrappableError<ErrorCode>>
fn write_via_stream( &mut self, fd: Resource<Descriptor>, offset: u64, ) -> Result<Resource<Box<dyn HostOutputStream>>, TrappableError<ErrorCode>>
Return a stream for writing to a file, if available. Read more
Source§fn append_via_stream(
&mut self,
fd: Resource<Descriptor>,
) -> Result<Resource<Box<dyn HostOutputStream>>, TrappableError<ErrorCode>>
fn append_via_stream( &mut self, fd: Resource<Descriptor>, ) -> Result<Resource<Box<dyn HostOutputStream>>, TrappableError<ErrorCode>>
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, Error>
fn is_same_object( &mut self, a: Resource<Descriptor>, b: Resource<Descriptor>, ) -> Result<bool, Error>
Test whether two descriptors refer to the same filesystem object. Read more
Source§fn metadata_hash(
&mut self,
fd: Resource<Descriptor>,
) -> Result<MetadataHashValue, TrappableError<ErrorCode>>
fn metadata_hash( &mut self, fd: Resource<Descriptor>, ) -> Result<MetadataHashValue, TrappableError<ErrorCode>>
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,
) -> Result<MetadataHashValue, TrappableError<ErrorCode>>
fn metadata_hash_at( &mut self, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, ) -> Result<MetadataHashValue, TrappableError<ErrorCode>>
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<T> HostDescriptor for Twhere
T: WasiView,
impl<T> HostDescriptor for Twhere
T: WasiView,
Source§fn advise<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
offset: u64,
len: u64,
advice: Advice,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn advise<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
offset: u64,
len: u64,
advice: Advice,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Provide file advisory information on a descriptor. Read more
Source§fn sync_data<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn sync_data<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Synchronize the data of a file to disk. Read more
Source§fn get_flags<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<DescriptorFlags, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn get_flags<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<DescriptorFlags, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Get flags associated with a descriptor. Read more
Source§fn get_type<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<DescriptorType, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn get_type<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<DescriptorType, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Get the dynamic type of a descriptor. Read more
Source§fn set_size<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
size: u64,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn set_size<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
size: u64,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
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<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
atim: NewTimestamp,
mtim: NewTimestamp,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn set_times<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
atim: NewTimestamp,
mtim: NewTimestamp,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Adjust the timestamps of an open file or directory. Read more
Source§fn read<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
len: u64,
offset: u64,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, bool), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn read<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
len: u64,
offset: u64,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, bool), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Read from a descriptor, without using and updating the descriptor’s offset. Read more
Source§fn write<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
buf: Vec<u8>,
offset: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn write<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
buf: Vec<u8>,
offset: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Write to a descriptor, without using and updating the descriptor’s offset. Read more
Source§fn read_directory<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<Resource<ReaddirIterator>, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn read_directory<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<Resource<ReaddirIterator>, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Read directory entries from a directory. Read more
Source§fn sync<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn sync<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Synchronize the data and metadata of a file to disk. Read more
Source§fn create_directory_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn create_directory_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Create a directory. Read more
Source§fn stat<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<DescriptorStat, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn stat<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<DescriptorStat, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Return the attributes of an open file or directory. Read more
Source§fn stat_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
) -> Pin<Box<dyn Future<Output = Result<DescriptorStat, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn stat_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
) -> Pin<Box<dyn Future<Output = Result<DescriptorStat, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Return the attributes of a file or directory. Read more
Source§fn set_times_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
atim: NewTimestamp,
mtim: NewTimestamp,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn set_times_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
atim: NewTimestamp,
mtim: NewTimestamp,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Adjust the timestamps of a file or directory. Read more
Source§fn link_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
old_path_flags: PathFlags,
old_path: String,
new_descriptor: Resource<Descriptor>,
new_path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn link_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
old_path_flags: PathFlags,
old_path: String,
new_descriptor: Resource<Descriptor>,
new_path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Create a hard link. Read more
Source§fn open_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
oflags: OpenFlags,
flags: DescriptorFlags,
) -> Pin<Box<dyn Future<Output = Result<Resource<Descriptor>, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn open_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
oflags: OpenFlags,
flags: DescriptorFlags,
) -> Pin<Box<dyn Future<Output = Result<Resource<Descriptor>, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Open a file or directory. Read more
fn drop(&mut self, fd: Resource<Descriptor>) -> Result<(), Error>
Source§fn readlink_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = Result<String, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn readlink_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = Result<String, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Read the contents of a symbolic link. Read more
Source§fn remove_directory_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn remove_directory_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Remove a directory. Read more
Source§fn rename_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
old_path: String,
new_fd: Resource<Descriptor>,
new_path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn rename_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
old_path: String,
new_fd: Resource<Descriptor>,
new_path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Rename a filesystem object. Read more
Source§fn symlink_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
src_path: String,
dest_path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn symlink_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
src_path: String,
dest_path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Create a symbolic link (also known as a “symlink”). Read more
Source§fn unlink_file_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn unlink_file_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = Result<(), TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Unlink a filesystem object that is not a directory. Read more
Source§fn read_via_stream(
&mut self,
fd: Resource<Descriptor>,
offset: u64,
) -> Result<Resource<InputStream>, TrappableError<ErrorCode>>
fn read_via_stream( &mut self, fd: Resource<Descriptor>, offset: u64, ) -> Result<Resource<InputStream>, TrappableError<ErrorCode>>
Return a stream for reading from a file, if available. Read more
Source§fn write_via_stream(
&mut self,
fd: Resource<Descriptor>,
offset: u64,
) -> Result<Resource<Box<dyn HostOutputStream>>, TrappableError<ErrorCode>>
fn write_via_stream( &mut self, fd: Resource<Descriptor>, offset: u64, ) -> Result<Resource<Box<dyn HostOutputStream>>, TrappableError<ErrorCode>>
Return a stream for writing to a file, if available. Read more
Source§fn append_via_stream(
&mut self,
fd: Resource<Descriptor>,
) -> Result<Resource<Box<dyn HostOutputStream>>, TrappableError<ErrorCode>>
fn append_via_stream( &mut self, fd: Resource<Descriptor>, ) -> Result<Resource<Box<dyn HostOutputStream>>, TrappableError<ErrorCode>>
Return a stream for appending to a file, if available. Read more
Source§fn is_same_object<'life0, 'async_trait>(
&'life0 mut self,
a: Resource<Descriptor>,
b: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn is_same_object<'life0, 'async_trait>(
&'life0 mut self,
a: Resource<Descriptor>,
b: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Test whether two descriptors refer to the same filesystem object. Read more
Source§fn metadata_hash<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<MetadataHashValue, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn metadata_hash<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<MetadataHashValue, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Return a hash of the metadata associated with a filesystem object referred
to by a descriptor. Read more
Source§fn metadata_hash_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
) -> Pin<Box<dyn Future<Output = Result<MetadataHashValue, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn metadata_hash_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
) -> Pin<Box<dyn Future<Output = Result<MetadataHashValue, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
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<T> HostDirectoryEntryStream for Twhere
T: HostDirectoryEntryStream,
impl<T> HostDirectoryEntryStream for Twhere
T: HostDirectoryEntryStream,
Source§fn read_directory_entry(
&mut self,
stream: Resource<ReaddirIterator>,
) -> Result<Option<DirectoryEntry>, TrappableError<ErrorCode>>
fn read_directory_entry( &mut self, stream: Resource<ReaddirIterator>, ) -> Result<Option<DirectoryEntry>, TrappableError<ErrorCode>>
Read a single directory entry from a
directory-entry-stream.fn drop(&mut self, stream: Resource<ReaddirIterator>) -> Result<(), Error>
Source§impl<T> HostDirectoryEntryStream for Twhere
T: WasiView,
impl<T> HostDirectoryEntryStream for Twhere
T: WasiView,
Source§fn read_directory_entry<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<ReaddirIterator>,
) -> Pin<Box<dyn Future<Output = Result<Option<DirectoryEntry>, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn read_directory_entry<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<ReaddirIterator>,
) -> Pin<Box<dyn Future<Output = Result<Option<DirectoryEntry>, TrappableError<ErrorCode>>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Read a single directory entry from a
directory-entry-stream.fn drop(&mut self, stream: Resource<ReaddirIterator>) -> Result<(), Error>
Source§impl<T> HostIncomingDatagramStream for Twhere
T: WasiView,
impl<T> HostIncomingDatagramStream for Twhere
T: WasiView,
Source§fn receive(
&mut self,
this: Resource<IncomingDatagramStream>,
max_results: u64,
) -> Result<Vec<IncomingDatagram>, TrappableError<ErrorCode>>
fn receive( &mut self, this: Resource<IncomingDatagramStream>, max_results: u64, ) -> Result<Vec<IncomingDatagram>, TrappableError<ErrorCode>>
Receive messages on the socket. Read more
Source§fn subscribe(
&mut self,
this: Resource<IncomingDatagramStream>,
) -> Result<Resource<Pollable>, Error>
fn subscribe( &mut self, this: Resource<IncomingDatagramStream>, ) -> Result<Resource<Pollable>, Error>
Create a
pollable which will resolve once the stream is ready to receive again. Read morefn drop(&mut self, this: Resource<IncomingDatagramStream>) -> Result<(), Error>
Source§impl<T> HostInputStream for Twhere
T: WasiView,
impl<T> HostInputStream for Twhere
T: WasiView,
fn drop(&mut self, stream: Resource<InputStream>) -> Result<(), Error>
Source§fn read(
&mut self,
stream: Resource<InputStream>,
len: u64,
) -> Result<Vec<u8>, StreamError>
fn read( &mut self, stream: Resource<InputStream>, len: u64, ) -> Result<Vec<u8>, StreamError>
Perform a non-blocking read from the stream. Read more
Source§fn blocking_read(
&mut self,
stream: Resource<InputStream>,
len: u64,
) -> Result<Vec<u8>, StreamError>
fn blocking_read( &mut self, stream: Resource<InputStream>, len: u64, ) -> Result<Vec<u8>, StreamError>
Read bytes from a stream, after blocking until at least one byte can
be read. Except for blocking, behavior is identical to
read.Source§fn skip(
&mut self,
stream: Resource<InputStream>,
len: u64,
) -> Result<u64, StreamError>
fn skip( &mut self, stream: Resource<InputStream>, len: u64, ) -> Result<u64, StreamError>
Skip bytes from a stream. Returns number of bytes skipped. Read more
Source§fn blocking_skip(
&mut self,
stream: Resource<InputStream>,
len: u64,
) -> Result<u64, StreamError>
fn blocking_skip( &mut self, stream: Resource<InputStream>, len: u64, ) -> Result<u64, StreamError>
Skip bytes from a stream, after blocking until at least one byte
can be skipped. Except for blocking behavior, identical to
skip.Source§fn subscribe(
&mut self,
stream: Resource<InputStream>,
) -> Result<Resource<Pollable>, Error>
fn subscribe( &mut self, stream: Resource<InputStream>, ) -> Result<Resource<Pollable>, Error>
Create a
pollable which will resolve once either the specified stream
has bytes available to read or the other end of the stream has been
closed.
The created pollable is a child resource of the input-stream.
Implementations may trap if the input-stream is dropped before
all derived pollables created with this function are dropped.Source§impl<T> HostInputStream for Twhere
T: WasiView,
impl<T> HostInputStream for Twhere
T: WasiView,
fn drop(&mut self, stream: Resource<InputStream>) -> Result<(), Error>
Source§fn read<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn read<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Perform a non-blocking read from the stream. Read more
Source§fn blocking_read<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn blocking_read<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Read bytes from a stream, after blocking until at least one byte can
be read. Except for blocking, behavior is identical to
read.Source§fn skip<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn skip<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Skip bytes from a stream. Returns number of bytes skipped. Read more
Source§fn blocking_skip<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn blocking_skip<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Skip bytes from a stream, after blocking until at least one byte
can be skipped. Except for blocking behavior, identical to
skip.Source§fn subscribe(
&mut self,
stream: Resource<InputStream>,
) -> Result<Resource<Pollable>, Error>
fn subscribe( &mut self, stream: Resource<InputStream>, ) -> Result<Resource<Pollable>, Error>
Create a
pollable which will resolve once either the specified stream
has bytes available to read or the other end of the stream has been
closed.
The created pollable is a child resource of the input-stream.
Implementations may trap if the input-stream is dropped before
all derived pollables created with this function are dropped.Source§impl<T> HostNetwork for Twhere
T: WasiView,
impl<T> HostNetwork for Twhere
T: WasiView,
Source§impl<T> HostOutgoingDatagramStream for Twhere
T: WasiView,
impl<T> HostOutgoingDatagramStream for Twhere
T: WasiView,
Source§fn check_send(
&mut self,
this: Resource<OutgoingDatagramStream>,
) -> Result<u64, TrappableError<ErrorCode>>
fn check_send( &mut self, this: Resource<OutgoingDatagramStream>, ) -> Result<u64, TrappableError<ErrorCode>>
Check readiness for sending. This function never blocks. Read more
Source§fn send(
&mut self,
this: Resource<OutgoingDatagramStream>,
datagrams: Vec<OutgoingDatagram>,
) -> Result<u64, TrappableError<ErrorCode>>
fn send( &mut self, this: Resource<OutgoingDatagramStream>, datagrams: Vec<OutgoingDatagram>, ) -> Result<u64, TrappableError<ErrorCode>>
Send messages on the socket. Read more
Source§fn subscribe(
&mut self,
this: Resource<OutgoingDatagramStream>,
) -> Result<Resource<Pollable>, Error>
fn subscribe( &mut self, this: Resource<OutgoingDatagramStream>, ) -> Result<Resource<Pollable>, Error>
Create a
pollable which will resolve once the stream is ready to send again. Read morefn drop(&mut self, this: Resource<OutgoingDatagramStream>) -> Result<(), Error>
Source§impl<T> HostOutputStream for Twhere
T: WasiView,
impl<T> HostOutputStream for Twhere
T: WasiView,
fn drop( &mut self, stream: Resource<Box<dyn HostOutputStream>>, ) -> Result<(), Error>
Source§fn check_write(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
) -> Result<u64, StreamError>
fn check_write( &mut self, stream: Resource<Box<dyn HostOutputStream>>, ) -> Result<u64, StreamError>
Check readiness for writing. This function never blocks. Read more
Source§fn write(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
bytes: Vec<u8>,
) -> Result<(), StreamError>
fn write( &mut self, stream: Resource<Box<dyn HostOutputStream>>, bytes: Vec<u8>, ) -> Result<(), StreamError>
Perform a write. This function never blocks. Read more
Source§fn blocking_write_and_flush(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
bytes: Vec<u8>,
) -> Result<(), StreamError>
fn blocking_write_and_flush( &mut self, stream: Resource<Box<dyn HostOutputStream>>, bytes: Vec<u8>, ) -> Result<(), StreamError>
Perform a write of up to 4096 bytes, and then flush the stream. Block
until all of these operations are complete, or an error occurs. Read more
Source§fn blocking_write_zeroes_and_flush(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
len: u64,
) -> Result<(), StreamError>
fn blocking_write_zeroes_and_flush( &mut self, stream: Resource<Box<dyn HostOutputStream>>, len: u64, ) -> Result<(), StreamError>
Perform a write of up to 4096 zeroes, and then flush the stream.
Block until all of these operations are complete, or an error
occurs. Read more
Source§fn subscribe(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
) -> Result<Resource<Pollable>, Error>
fn subscribe( &mut self, stream: Resource<Box<dyn HostOutputStream>>, ) -> Result<Resource<Pollable>, Error>
Create a
pollable which will resolve once the output-stream
is ready for more writing, or an error has occured. When this
pollable is ready, check-write will return ok(n) with n>0, or an
error. Read moreSource§fn write_zeroes(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
len: u64,
) -> Result<(), StreamError>
fn write_zeroes( &mut self, stream: Resource<Box<dyn HostOutputStream>>, len: u64, ) -> Result<(), StreamError>
Write zeroes to a stream. Read more
Source§fn flush(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
) -> Result<(), StreamError>
fn flush( &mut self, stream: Resource<Box<dyn HostOutputStream>>, ) -> Result<(), StreamError>
Request to flush buffered output. This function never blocks. Read more
Source§fn blocking_flush(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
) -> Result<(), StreamError>
fn blocking_flush( &mut self, stream: Resource<Box<dyn HostOutputStream>>, ) -> Result<(), StreamError>
Request to flush buffered output, and block until flush completes
and stream is ready for writing again.
Source§fn splice(
&mut self,
dst: Resource<Box<dyn HostOutputStream>>,
src: Resource<InputStream>,
len: u64,
) -> Result<u64, StreamError>
fn splice( &mut self, dst: Resource<Box<dyn HostOutputStream>>, src: Resource<InputStream>, len: u64, ) -> Result<u64, StreamError>
Read from one stream and write to another. Read more
Source§fn blocking_splice(
&mut self,
dst: Resource<Box<dyn HostOutputStream>>,
src: Resource<InputStream>,
len: u64,
) -> Result<u64, StreamError>
fn blocking_splice( &mut self, dst: Resource<Box<dyn HostOutputStream>>, src: Resource<InputStream>, len: u64, ) -> Result<u64, StreamError>
Read from one stream and write to another, with blocking. Read more
Source§impl<T> HostOutputStream for Twhere
T: WasiView,
impl<T> HostOutputStream for Twhere
T: WasiView,
fn drop( &mut self, stream: Resource<Box<dyn HostOutputStream>>, ) -> Result<(), Error>
Source§fn check_write(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
) -> Result<u64, StreamError>
fn check_write( &mut self, stream: Resource<Box<dyn HostOutputStream>>, ) -> Result<u64, StreamError>
Check readiness for writing. This function never blocks. Read more
Source§fn write(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
bytes: Vec<u8>,
) -> Result<(), StreamError>
fn write( &mut self, stream: Resource<Box<dyn HostOutputStream>>, bytes: Vec<u8>, ) -> Result<(), StreamError>
Perform a write. This function never blocks. Read more
Source§fn subscribe(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
) -> Result<Resource<Pollable>, Error>
fn subscribe( &mut self, stream: Resource<Box<dyn HostOutputStream>>, ) -> Result<Resource<Pollable>, Error>
Create a
pollable which will resolve once the output-stream
is ready for more writing, or an error has occured. When this
pollable is ready, check-write will return ok(n) with n>0, or an
error. Read moreSource§fn blocking_write_and_flush<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<Box<dyn HostOutputStream>>,
bytes: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn blocking_write_and_flush<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<Box<dyn HostOutputStream>>,
bytes: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Perform a write of up to 4096 bytes, and then flush the stream. Block
until all of these operations are complete, or an error occurs. Read more
Source§fn blocking_write_zeroes_and_flush<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<Box<dyn HostOutputStream>>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn blocking_write_zeroes_and_flush<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<Box<dyn HostOutputStream>>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Perform a write of up to 4096 zeroes, and then flush the stream.
Block until all of these operations are complete, or an error
occurs. Read more
Source§fn write_zeroes(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
len: u64,
) -> Result<(), StreamError>
fn write_zeroes( &mut self, stream: Resource<Box<dyn HostOutputStream>>, len: u64, ) -> Result<(), StreamError>
Write zeroes to a stream. Read more
Source§fn flush(
&mut self,
stream: Resource<Box<dyn HostOutputStream>>,
) -> Result<(), StreamError>
fn flush( &mut self, stream: Resource<Box<dyn HostOutputStream>>, ) -> Result<(), StreamError>
Request to flush buffered output. This function never blocks. Read more
Source§fn blocking_flush<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<Box<dyn HostOutputStream>>,
) -> Pin<Box<dyn Future<Output = Result<(), StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn blocking_flush<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<Box<dyn HostOutputStream>>,
) -> Pin<Box<dyn Future<Output = Result<(), StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Request to flush buffered output, and block until flush completes
and stream is ready for writing again.
Source§fn splice<'life0, 'async_trait>(
&'life0 mut self,
dest: Resource<Box<dyn HostOutputStream>>,
src: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn splice<'life0, 'async_trait>(
&'life0 mut self,
dest: Resource<Box<dyn HostOutputStream>>,
src: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Read from one stream and write to another. Read more
Source§fn blocking_splice<'life0, 'async_trait>(
&'life0 mut self,
dest: Resource<Box<dyn HostOutputStream>>,
src: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn blocking_splice<'life0, 'async_trait>(
&'life0 mut self,
dest: Resource<Box<dyn HostOutputStream>>,
src: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = Result<u64, StreamError>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Read from one stream and write to another, with blocking. Read more
Source§impl<T> HostPollable for Twhere
T: WasiView,
impl<T> HostPollable for Twhere
T: WasiView,
Source§fn ready(&mut self, pollable: Resource<Pollable>) -> Result<bool, Error>
fn ready(&mut self, pollable: Resource<Pollable>) -> Result<bool, Error>
Return the readiness of a pollable. This function never blocks. Read more
Source§fn block(&mut self, pollable: Resource<Pollable>) -> Result<(), Error>
fn block(&mut self, pollable: Resource<Pollable>) -> Result<(), Error>
block returns immediately if the pollable is ready, and otherwise
blocks until ready. Read morefn drop(&mut self, pollable: Resource<Pollable>) -> Result<(), Error>
Source§impl<T> HostPollable for Twhere
T: WasiView,
impl<T> HostPollable for Twhere
T: WasiView,
Source§fn block<'life0, 'async_trait>(
&'life0 mut self,
pollable: Resource<Pollable>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn block<'life0, 'async_trait>(
&'life0 mut self,
pollable: Resource<Pollable>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
block returns immediately if the pollable is ready, and otherwise
blocks until ready. Read moreSource§fn ready<'life0, 'async_trait>(
&'life0 mut self,
pollable: Resource<Pollable>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn ready<'life0, 'async_trait>(
&'life0 mut self,
pollable: Resource<Pollable>,
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Return the readiness of a pollable. This function never blocks. Read more
fn drop(&mut self, pollable: Resource<Pollable>) -> Result<(), Error>
Source§impl<T> HostResolveAddressStream for Twhere
T: WasiView,
impl<T> HostResolveAddressStream for Twhere
T: WasiView,
Source§fn resolve_next_address(
&mut self,
resource: Resource<ResolveAddressStream>,
) -> Result<Option<IpAddress>, TrappableError<ErrorCode>>
fn resolve_next_address( &mut self, resource: Resource<ResolveAddressStream>, ) -> Result<Option<IpAddress>, TrappableError<ErrorCode>>
Returns the next address from the resolver. Read more
Source§fn subscribe(
&mut self,
resource: Resource<ResolveAddressStream>,
) -> Result<Resource<Pollable>, Error>
fn subscribe( &mut self, resource: Resource<ResolveAddressStream>, ) -> Result<Resource<Pollable>, Error>
Create a
pollable which will resolve once the stream is ready for I/O. Read morefn drop( &mut self, resource: Resource<ResolveAddressStream>, ) -> Result<(), Error>
Source§impl<T> HostTcpSocket for Twhere
T: WasiView,
impl<T> HostTcpSocket for Twhere
T: WasiView,
Source§fn start_bind(
&mut self,
this: Resource<TcpSocket>,
network: Resource<Network>,
local_address: IpSocketAddress,
) -> Result<(), TrappableError<ErrorCode>>
fn start_bind( &mut self, this: Resource<TcpSocket>, network: Resource<Network>, local_address: IpSocketAddress, ) -> Result<(), TrappableError<ErrorCode>>
Bind the socket to a specific network on the provided IP address and port. Read more
fn finish_bind( &mut self, this: Resource<TcpSocket>, ) -> Result<(), TrappableError<ErrorCode>>
Source§fn start_connect(
&mut self,
this: Resource<TcpSocket>,
network: Resource<Network>,
remote_address: IpSocketAddress,
) -> Result<(), TrappableError<ErrorCode>>
fn start_connect( &mut self, this: Resource<TcpSocket>, network: Resource<Network>, remote_address: IpSocketAddress, ) -> Result<(), TrappableError<ErrorCode>>
Connect to a remote endpoint. Read more
fn finish_connect( &mut self, this: Resource<TcpSocket>, ) -> Result<(Resource<InputStream>, Resource<Box<dyn HostOutputStream>>), TrappableError<ErrorCode>>
Source§fn start_listen(
&mut self,
this: Resource<TcpSocket>,
) -> Result<(), TrappableError<ErrorCode>>
fn start_listen( &mut self, this: Resource<TcpSocket>, ) -> Result<(), TrappableError<ErrorCode>>
Start listening for new connections. Read more
fn finish_listen( &mut self, this: Resource<TcpSocket>, ) -> Result<(), TrappableError<ErrorCode>>
Source§fn accept(
&mut self,
this: Resource<TcpSocket>,
) -> Result<(Resource<TcpSocket>, Resource<InputStream>, Resource<Box<dyn HostOutputStream>>), TrappableError<ErrorCode>>
fn accept( &mut self, this: Resource<TcpSocket>, ) -> Result<(Resource<TcpSocket>, Resource<InputStream>, Resource<Box<dyn HostOutputStream>>), TrappableError<ErrorCode>>
Accept a new client socket. Read more
Source§fn local_address(
&mut self,
this: Resource<TcpSocket>,
) -> Result<IpSocketAddress, TrappableError<ErrorCode>>
fn local_address( &mut self, this: Resource<TcpSocket>, ) -> Result<IpSocketAddress, TrappableError<ErrorCode>>
Get the bound local address. Read more
Source§fn remote_address(
&mut self,
this: Resource<TcpSocket>,
) -> Result<IpSocketAddress, TrappableError<ErrorCode>>
fn remote_address( &mut self, this: Resource<TcpSocket>, ) -> Result<IpSocketAddress, TrappableError<ErrorCode>>
Get the remote address. Read more
Source§fn is_listening(&mut self, this: Resource<TcpSocket>) -> Result<bool, Error>
fn is_listening(&mut self, this: Resource<TcpSocket>) -> Result<bool, Error>
Whether the socket is in the
listening state. Read moreSource§fn address_family(
&mut self,
this: Resource<TcpSocket>,
) -> Result<IpAddressFamily, Error>
fn address_family( &mut self, this: Resource<TcpSocket>, ) -> Result<IpAddressFamily, Error>
Whether this is a IPv4 or IPv6 socket. Read more
Source§fn set_listen_backlog_size(
&mut self,
this: Resource<TcpSocket>,
value: u64,
) -> Result<(), TrappableError<ErrorCode>>
fn set_listen_backlog_size( &mut self, this: Resource<TcpSocket>, value: u64, ) -> Result<(), TrappableError<ErrorCode>>
Hints the desired listen queue size. Implementations are free to ignore this. Read more
Source§fn keep_alive_enabled(
&mut self,
this: Resource<TcpSocket>,
) -> Result<bool, TrappableError<ErrorCode>>
fn keep_alive_enabled( &mut self, this: Resource<TcpSocket>, ) -> Result<bool, TrappableError<ErrorCode>>
Enables or disables keepalive. Read more
fn set_keep_alive_enabled( &mut self, this: Resource<TcpSocket>, value: bool, ) -> Result<(), TrappableError<ErrorCode>>
Source§fn keep_alive_idle_time(
&mut self,
this: Resource<TcpSocket>,
) -> Result<u64, TrappableError<ErrorCode>>
fn keep_alive_idle_time( &mut self, this: Resource<TcpSocket>, ) -> Result<u64, TrappableError<ErrorCode>>
Amount of time the connection has to be idle before TCP starts sending keepalive packets. Read more
fn set_keep_alive_idle_time( &mut self, this: Resource<TcpSocket>, value: u64, ) -> Result<(), TrappableError<ErrorCode>>
Source§fn keep_alive_interval(
&mut self,
this: Resource<TcpSocket>,
) -> Result<u64, TrappableError<ErrorCode>>
fn keep_alive_interval( &mut self, this: Resource<TcpSocket>, ) -> Result<u64, TrappableError<ErrorCode>>
The time between keepalive packets. Read more
fn set_keep_alive_interval( &mut self, this: Resource<TcpSocket>, value: u64, ) -> Result<(), TrappableError<ErrorCode>>
Source§fn keep_alive_count(
&mut self,
this: Resource<TcpSocket>,
) -> Result<u32, TrappableError<ErrorCode>>
fn keep_alive_count( &mut self, this: Resource<TcpSocket>, ) -> Result<u32, TrappableError<ErrorCode>>
The maximum amount of keepalive packets TCP should send before aborting the connection. Read more
fn set_keep_alive_count( &mut self, this: Resource<TcpSocket>, value: u32, ) -> Result<(), TrappableError<ErrorCode>>
Source§fn hop_limit(
&mut self,
this: Resource<TcpSocket>,
) -> Result<u8, TrappableError<ErrorCode>>
fn hop_limit( &mut self, this: Resource<TcpSocket>, ) -> Result<u8, TrappableError<ErrorCode>>
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. Read more
fn set_hop_limit( &mut self, this: Resource<TcpSocket>, value: u8, ) -> Result<(), TrappableError<ErrorCode>>
Source§fn receive_buffer_size(
&mut self,
this: Resource<TcpSocket>,
) -> Result<u64, TrappableError<ErrorCode>>
fn receive_buffer_size( &mut self, this: Resource<TcpSocket>, ) -> Result<u64, TrappableError<ErrorCode>>
The kernel buffer space reserved for sends/receives on this socket. Read more
fn set_receive_buffer_size( &mut self, this: Resource<TcpSocket>, value: u64, ) -> Result<(), TrappableError<ErrorCode>>
fn send_buffer_size( &mut self, this: Resource<TcpSocket>, ) -> Result<u64, TrappableError<ErrorCode>>
fn set_send_buffer_size( &mut self, this: Resource<TcpSocket>, value: u64, ) -> Result<(), TrappableError<ErrorCode>>
Source§fn subscribe(
&mut self,
this: Resource<TcpSocket>,
) -> Result<Resource<Pollable>, Error>
fn subscribe( &mut self, this: Resource<TcpSocket>, ) -> Result<Resource<Pollable>, Error>
Create a
pollable which can be used to poll for, or block on,
completion of any of the asynchronous operations of this socket. Read moreSource§fn shutdown(
&mut self,
this: Resource<TcpSocket>,
shutdown_type: ShutdownType,
) -> Result<(), TrappableError<ErrorCode>>
fn shutdown( &mut self, this: Resource<TcpSocket>, shutdown_type: ShutdownType, ) -> Result<(), TrappableError<ErrorCode>>
Initiate a graceful shutdown. Read more
fn drop(&mut self, this: Resource<TcpSocket>) -> Result<(), Error>
Source§impl<T> HostTerminalInput for Twhere
T: WasiView,
impl<T> HostTerminalInput for Twhere
T: WasiView,
Source§impl<T> HostTerminalOutput for Twhere
T: WasiView,
impl<T> HostTerminalOutput for Twhere
T: WasiView,
Source§impl<T> HostUdpSocket for Twhere
T: WasiView,
impl<T> HostUdpSocket for Twhere
T: WasiView,
Source§fn start_bind(
&mut self,
this: Resource<UdpSocket>,
network: Resource<Network>,
local_address: IpSocketAddress,
) -> Result<(), TrappableError<ErrorCode>>
fn start_bind( &mut self, this: Resource<UdpSocket>, network: Resource<Network>, local_address: IpSocketAddress, ) -> Result<(), TrappableError<ErrorCode>>
Bind the socket to a specific network on the provided IP address and port. Read more
fn finish_bind( &mut self, this: Resource<UdpSocket>, ) -> Result<(), TrappableError<ErrorCode>>
Source§fn stream(
&mut self,
this: Resource<UdpSocket>,
remote_address: Option<IpSocketAddress>,
) -> Result<(Resource<IncomingDatagramStream>, Resource<OutgoingDatagramStream>), TrappableError<ErrorCode>>
fn stream( &mut self, this: Resource<UdpSocket>, remote_address: Option<IpSocketAddress>, ) -> Result<(Resource<IncomingDatagramStream>, Resource<OutgoingDatagramStream>), TrappableError<ErrorCode>>
Set up inbound & outbound communication channels, optionally to a specific peer. Read more
Source§fn local_address(
&mut self,
this: Resource<UdpSocket>,
) -> Result<IpSocketAddress, TrappableError<ErrorCode>>
fn local_address( &mut self, this: Resource<UdpSocket>, ) -> Result<IpSocketAddress, TrappableError<ErrorCode>>
Get the current bound address. Read more
Source§fn remote_address(
&mut self,
this: Resource<UdpSocket>,
) -> Result<IpSocketAddress, TrappableError<ErrorCode>>
fn remote_address( &mut self, this: Resource<UdpSocket>, ) -> Result<IpSocketAddress, TrappableError<ErrorCode>>
Get the address the socket is currently streaming to. Read more
Source§fn address_family(
&mut self,
this: Resource<UdpSocket>,
) -> Result<IpAddressFamily, Error>
fn address_family( &mut self, this: Resource<UdpSocket>, ) -> Result<IpAddressFamily, Error>
Whether this is a IPv4 or IPv6 socket. Read more
Source§fn unicast_hop_limit(
&mut self,
this: Resource<UdpSocket>,
) -> Result<u8, TrappableError<ErrorCode>>
fn unicast_hop_limit( &mut self, this: Resource<UdpSocket>, ) -> Result<u8, TrappableError<ErrorCode>>
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. Read more
fn set_unicast_hop_limit( &mut self, this: Resource<UdpSocket>, value: u8, ) -> Result<(), TrappableError<ErrorCode>>
Source§fn receive_buffer_size(
&mut self,
this: Resource<UdpSocket>,
) -> Result<u64, TrappableError<ErrorCode>>
fn receive_buffer_size( &mut self, this: Resource<UdpSocket>, ) -> Result<u64, TrappableError<ErrorCode>>
The kernel buffer space reserved for sends/receives on this socket. Read more
fn set_receive_buffer_size( &mut self, this: Resource<UdpSocket>, value: u64, ) -> Result<(), TrappableError<ErrorCode>>
fn send_buffer_size( &mut self, this: Resource<UdpSocket>, ) -> Result<u64, TrappableError<ErrorCode>>
fn set_send_buffer_size( &mut self, this: Resource<UdpSocket>, value: u64, ) -> Result<(), TrappableError<ErrorCode>>
Source§fn subscribe(
&mut self,
this: Resource<UdpSocket>,
) -> Result<Resource<Pollable>, Error>
fn subscribe( &mut self, this: Resource<UdpSocket>, ) -> Result<Resource<Pollable>, Error>
Create a
pollable which will resolve once the socket is ready for I/O. Read morefn drop(&mut self, this: Resource<UdpSocket>) -> Result<(), Error>
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