Struct wasmtime_wasi::WasiImpl
source · #[repr(transparent)]pub struct WasiImpl<T>(pub T);
Expand description
A small newtype wrapper which serves as the basis for implementations of
Host
WASI traits in this crate.
This type is used as the basis for the implementation of all Host
traits
generated by bindgen!
for WASI interfaces. This is used automatically with
add_to_linker_sync
and
add_to_linker_async
.
This type is otherwise provided if you’re calling the add_to_linker
functions generated by bindgen!
from the bindings
module. In this situation you’ll want to create a value of
this type in the closures added to a Linker
.
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
source§fn resolution(&mut self) -> Result<Instant>
fn resolution(&mut self) -> Result<Instant>
Query the resolution of the clock. Returns the duration of time
corresponding to a clock tick.
source§fn subscribe_instant(&mut self, when: Instant) -> Result<Resource<Pollable>>
fn subscribe_instant(&mut self, when: Instant) -> Result<Resource<Pollable>>
Create a
pollable
which will resolve once the specified instant
has occurred.source§fn subscribe_duration(
&mut self,
duration: WasiDuration,
) -> Result<Resource<Pollable>>
fn subscribe_duration( &mut self, duration: WasiDuration, ) -> Result<Resource<Pollable>>
Create a
pollable
that will resolve after the specified duration has
elapsed from the time this function is invoked.source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
fn convert_stream_error(&mut self, err: StreamError) -> Result<StreamError>
source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
fn convert_error_code(&mut self, error: SocketError) -> Result<ErrorCode>
source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
source§fn create_tcp_socket(
&mut self,
address_family: IpAddressFamily,
) -> SocketResult<Resource<TcpSocket>>
fn create_tcp_socket( &mut self, address_family: IpAddressFamily, ) -> SocketResult<Resource<TcpSocket>>
Create a new TCP socket. Read more
source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
source§fn create_udp_socket(
&mut self,
address_family: IpAddressFamily,
) -> SocketResult<Resource<UdpSocket>>
fn create_udp_socket( &mut self, address_family: IpAddressFamily, ) -> SocketResult<Resource<UdpSocket>>
Create a new UDP socket. Read more
source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
source§fn resolve_addresses(
&mut self,
network: Resource<Network>,
name: String,
) -> Result<Resource<ResolveAddressStream>, SocketError>
fn resolve_addresses( &mut self, network: Resource<Network>, name: String, ) -> Result<Resource<ResolveAddressStream>, SocketError>
Resolve an internet host name to a list of IP addresses. Read more
source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
fn get_stdout(&mut self) -> Result<Resource<OutputStream>, Error>
source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
fn get_stderr(&mut self) -> Result<Resource<OutputStream>, Error>
source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
source§fn get_terminal_stdin(&mut self) -> Result<Option<Resource<TerminalInput>>>
fn get_terminal_stdin(&mut self) -> Result<Option<Resource<TerminalInput>>>
If stdin is connected to a terminal, return a
terminal-input
handle
allowing further interaction with it.source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
source§fn get_terminal_stdout(&mut self) -> Result<Option<Resource<TerminalOutput>>>
fn get_terminal_stdout(&mut self) -> Result<Option<Resource<TerminalOutput>>>
If stdout is connected to a terminal, return a
terminal-output
handle
allowing further interaction with it.source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
source§fn get_terminal_stderr(&mut self) -> Result<Option<Resource<TerminalOutput>>>
fn get_terminal_stderr(&mut self) -> Result<Option<Resource<TerminalOutput>>>
If stderr is connected to a terminal, return a
terminal-output
handle
allowing further interaction with it.source§impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
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 WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
fn convert_stream_error(&mut self, err: StreamError) -> Result<StreamError>
source§impl<T> HostDescriptor for WasiImpl<T>where
T: WasiView,
impl<T> HostDescriptor for WasiImpl<T>where
T: WasiView,
source§fn advise(
&mut self,
fd: Resource<Descriptor>,
offset: Filesize,
len: Filesize,
advice: Advice,
) -> FsResult<()>
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<()>
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>
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>
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<()>
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<()>
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)>
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>
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>>
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<()>
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<()>
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>
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>
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<()>
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
source§fn link_at(
&mut self,
fd: Resource<Descriptor>,
old_path_flags: PathFlags,
old_path: String,
new_descriptor: Resource<Descriptor>,
new_path: String,
) -> FsResult<()>
fn link_at( &mut self, fd: Resource<Descriptor>, old_path_flags: PathFlags, old_path: String, new_descriptor: Resource<Descriptor>, new_path: String, ) -> FsResult<()>
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>>
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
fn drop(&mut self, fd: Resource<Descriptor>) -> Result<()>
source§fn readlink_at(
&mut self,
fd: Resource<Descriptor>,
path: String,
) -> FsResult<String>
fn readlink_at( &mut self, fd: Resource<Descriptor>, path: String, ) -> FsResult<String>
Read the contents of a symbolic link. Read more
source§fn remove_directory_at(
&mut self,
fd: Resource<Descriptor>,
path: String,
) -> FsResult<()>
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<()>
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
source§fn symlink_at(
&mut self,
fd: Resource<Descriptor>,
src_path: String,
dest_path: String,
) -> FsResult<()>
fn symlink_at( &mut self, fd: Resource<Descriptor>, src_path: String, dest_path: String, ) -> FsResult<()>
Create a symbolic link (also known as a “symlink”). Read more
source§fn unlink_file_at(
&mut self,
fd: Resource<Descriptor>,
path: String,
) -> FsResult<()>
fn unlink_file_at( &mut self, fd: Resource<Descriptor>, path: String, ) -> FsResult<()>
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>>
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>>
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>>
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>
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>
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>
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<T> HostDescriptor for WasiImpl<T>where
T: WasiView,
impl<T> HostDescriptor for WasiImpl<T>where
T: WasiView,
source§fn advise<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
offset: Filesize,
len: Filesize,
advice: Advice,
) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn advise<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
offset: Filesize,
len: Filesize,
advice: Advice,
) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync_data<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<DescriptorFlags>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_flags<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = FsResult<DescriptorFlags>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<DescriptorType>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_type<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = FsResult<DescriptorType>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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: Filesize,
) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_size<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
size: Filesize,
) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_times<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
atim: NewTimestamp,
mtim: NewTimestamp,
) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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: Filesize,
offset: Filesize,
) -> Pin<Box<dyn Future<Output = FsResult<(Vec<u8>, bool)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
len: Filesize,
offset: Filesize,
) -> Pin<Box<dyn Future<Output = FsResult<(Vec<u8>, bool)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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: Filesize,
) -> Pin<Box<dyn Future<Output = FsResult<Filesize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
buf: Vec<u8>,
offset: Filesize,
) -> Pin<Box<dyn Future<Output = FsResult<Filesize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<Resource<DirectoryEntryStream>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_directory<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = FsResult<Resource<DirectoryEntryStream>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn sync<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_directory_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a directory. Read more
source§fn stat<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = FsResult<DescriptorStat>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stat<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = FsResult<DescriptorStat>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<DescriptorStat>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stat_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
) -> Pin<Box<dyn Future<Output = FsResult<DescriptorStat>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<Resource<Descriptor>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<Resource<Descriptor>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Open a file or directory. Read more
fn drop(&mut self, fd: Resource<Descriptor>) -> Result<()>
source§fn readlink_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = FsResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn readlink_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = FsResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_directory_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unlink_file_at<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
path: String,
) -> Pin<Box<dyn Future<Output = FsResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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>>
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>>
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>>
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<'life0, 'async_trait>(
&'life0 mut self,
a: Resource<Descriptor>,
b: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<MetadataHashValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn metadata_hash<'life0, 'async_trait>(
&'life0 mut self,
fd: Resource<Descriptor>,
) -> Pin<Box<dyn Future<Output = FsResult<MetadataHashValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<MetadataHashValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 = FsResult<MetadataHashValue>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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 WasiImpl<T>where
T: WasiView,
impl<T> HostDirectoryEntryStream for WasiImpl<T>where
T: WasiView,
source§fn read_directory_entry(
&mut self,
stream: Resource<DirectoryEntryStream>,
) -> FsResult<Option<DirectoryEntry>>
fn read_directory_entry( &mut self, stream: Resource<DirectoryEntryStream>, ) -> FsResult<Option<DirectoryEntry>>
Read a single directory entry from a
directory-entry-stream
.fn drop(&mut self, stream: Resource<DirectoryEntryStream>) -> Result<()>
source§impl<T> HostDirectoryEntryStream for WasiImpl<T>where
T: WasiView,
impl<T> HostDirectoryEntryStream for WasiImpl<T>where
T: WasiView,
source§fn read_directory_entry<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<DirectoryEntryStream>,
) -> Pin<Box<dyn Future<Output = FsResult<Option<DirectoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_directory_entry<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<DirectoryEntryStream>,
) -> Pin<Box<dyn Future<Output = FsResult<Option<DirectoryEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read a single directory entry from a
directory-entry-stream
.fn drop(&mut self, stream: Resource<DirectoryEntryStream>) -> Result<()>
source§impl<T> HostIncomingDatagramStream for WasiImpl<T>where
T: WasiView,
impl<T> HostIncomingDatagramStream for WasiImpl<T>where
T: WasiView,
source§fn receive(
&mut self,
this: Resource<IncomingDatagramStream>,
max_results: u64,
) -> SocketResult<Vec<IncomingDatagram>>
fn receive( &mut self, this: Resource<IncomingDatagramStream>, max_results: u64, ) -> SocketResult<Vec<IncomingDatagram>>
Receive messages on the socket. Read more
source§fn subscribe(
&mut self,
this: Resource<IncomingDatagramStream>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, this: Resource<IncomingDatagramStream>, ) -> Result<Resource<Pollable>>
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> HostIncomingDatagramStream for WasiImpl<T>where
T: WasiView,
impl<T> HostIncomingDatagramStream for WasiImpl<T>where
T: WasiView,
source§fn receive(
&mut self,
self_: Resource<IncomingDatagramStream>,
max_results: u64,
) -> Result<Vec<IncomingDatagram>, SocketError>
fn receive( &mut self, self_: Resource<IncomingDatagramStream>, max_results: u64, ) -> Result<Vec<IncomingDatagram>, SocketError>
Receive messages on the socket. Read more
source§fn subscribe(
&mut self,
self_: Resource<IncomingDatagramStream>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, self_: Resource<IncomingDatagramStream>, ) -> Result<Resource<Pollable>>
Create a
pollable
which will resolve once the stream is ready to receive again. Read morefn drop(&mut self, rep: Resource<IncomingDatagramStream>) -> Result<()>
source§impl<T> HostInputStream for WasiImpl<T>where
T: WasiView,
impl<T> HostInputStream for WasiImpl<T>where
T: WasiView,
fn drop<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<InputStream>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
source§fn read(
&mut self,
stream: Resource<InputStream>,
len: u64,
) -> StreamResult<Vec<u8>>
fn read( &mut self, stream: Resource<InputStream>, len: u64, ) -> StreamResult<Vec<u8>>
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 = StreamResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn blocking_read<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = StreamResult<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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(&mut self, stream: Resource<InputStream>, len: u64) -> StreamResult<u64>
fn skip(&mut self, stream: Resource<InputStream>, len: u64) -> StreamResult<u64>
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 = StreamResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn blocking_skip<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = StreamResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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>>
fn subscribe( &mut self, stream: Resource<InputStream>, ) -> Result<Resource<Pollable>>
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 pollable
s created with this function are dropped.source§impl<T> HostInputStream for WasiImpl<T>where
T: WasiView,
impl<T> HostInputStream for WasiImpl<T>where
T: WasiView,
fn drop(&mut self, stream: Resource<InputStream>) -> Result<()>
source§fn read(
&mut self,
stream: Resource<InputStream>,
len: u64,
) -> StreamResult<Vec<u8>>
fn read( &mut self, stream: Resource<InputStream>, len: u64, ) -> StreamResult<Vec<u8>>
Perform a non-blocking read from the stream. Read more
source§fn blocking_read(
&mut self,
stream: Resource<InputStream>,
len: u64,
) -> StreamResult<Vec<u8>>
fn blocking_read( &mut self, stream: Resource<InputStream>, len: u64, ) -> StreamResult<Vec<u8>>
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) -> StreamResult<u64>
fn skip(&mut self, stream: Resource<InputStream>, len: u64) -> StreamResult<u64>
Skip bytes from a stream. Returns number of bytes skipped. Read more
source§fn blocking_skip(
&mut self,
stream: Resource<InputStream>,
len: u64,
) -> StreamResult<u64>
fn blocking_skip( &mut self, stream: Resource<InputStream>, len: u64, ) -> StreamResult<u64>
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>>
fn subscribe( &mut self, stream: Resource<InputStream>, ) -> Result<Resource<Pollable>>
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 pollable
s created with this function are dropped.source§impl<T> HostNetwork for WasiImpl<T>where
T: WasiView,
impl<T> HostNetwork for WasiImpl<T>where
T: WasiView,
source§impl<T> HostOutgoingDatagramStream for WasiImpl<T>where
T: WasiView,
impl<T> HostOutgoingDatagramStream for WasiImpl<T>where
T: WasiView,
source§fn check_send(
&mut self,
this: Resource<OutgoingDatagramStream>,
) -> SocketResult<u64>
fn check_send( &mut self, this: Resource<OutgoingDatagramStream>, ) -> SocketResult<u64>
Check readiness for sending. This function never blocks. Read more
source§fn send<'life0, 'async_trait>(
&'life0 mut self,
this: Resource<OutgoingDatagramStream>,
datagrams: Vec<OutgoingDatagram>,
) -> Pin<Box<dyn Future<Output = SocketResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 mut self,
this: Resource<OutgoingDatagramStream>,
datagrams: Vec<OutgoingDatagram>,
) -> Pin<Box<dyn Future<Output = SocketResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send messages on the socket. Read more
source§fn subscribe(
&mut self,
this: Resource<OutgoingDatagramStream>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, this: Resource<OutgoingDatagramStream>, ) -> Result<Resource<Pollable>>
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> HostOutgoingDatagramStream for WasiImpl<T>where
T: WasiView,
impl<T> HostOutgoingDatagramStream for WasiImpl<T>where
T: WasiView,
source§fn check_send(
&mut self,
self_: Resource<OutgoingDatagramStream>,
) -> Result<u64, SocketError>
fn check_send( &mut self, self_: Resource<OutgoingDatagramStream>, ) -> Result<u64, SocketError>
Check readiness for sending. This function never blocks. Read more
source§fn send(
&mut self,
self_: Resource<OutgoingDatagramStream>,
datagrams: Vec<OutgoingDatagram>,
) -> Result<u64, SocketError>
fn send( &mut self, self_: Resource<OutgoingDatagramStream>, datagrams: Vec<OutgoingDatagram>, ) -> Result<u64, SocketError>
Send messages on the socket. Read more
source§fn subscribe(
&mut self,
self_: Resource<OutgoingDatagramStream>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, self_: Resource<OutgoingDatagramStream>, ) -> Result<Resource<Pollable>>
Create a
pollable
which will resolve once the stream is ready to send again. Read morefn drop(&mut self, rep: Resource<OutgoingDatagramStream>) -> Result<()>
source§impl<T> HostOutputStream for WasiImpl<T>where
T: WasiView,
impl<T> HostOutputStream for WasiImpl<T>where
T: WasiView,
fn drop<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<OutputStream>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
source§fn check_write(&mut self, stream: Resource<OutputStream>) -> StreamResult<u64>
fn check_write(&mut self, stream: Resource<OutputStream>) -> StreamResult<u64>
Check readiness for writing. This function never blocks. Read more
source§fn write(
&mut self,
stream: Resource<OutputStream>,
bytes: Vec<u8>,
) -> StreamResult<()>
fn write( &mut self, stream: Resource<OutputStream>, bytes: Vec<u8>, ) -> StreamResult<()>
Perform a write. This function never blocks. Read more
source§fn subscribe(
&mut self,
stream: Resource<OutputStream>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, stream: Resource<OutputStream>, ) -> Result<Resource<Pollable>>
Create a
pollable
which will resolve once the output-stream
is ready for more writing, or an error has occurred. 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<OutputStream>,
bytes: Vec<u8>,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn blocking_write_and_flush<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<OutputStream>,
bytes: Vec<u8>,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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<OutputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn blocking_write_zeroes_and_flush<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<OutputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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<OutputStream>,
len: u64,
) -> StreamResult<()>
fn write_zeroes( &mut self, stream: Resource<OutputStream>, len: u64, ) -> StreamResult<()>
Write zeroes to a stream. Read more
source§fn flush(&mut self, stream: Resource<OutputStream>) -> StreamResult<()>
fn flush(&mut self, stream: Resource<OutputStream>) -> StreamResult<()>
Request to flush buffered output. This function never blocks. Read more
source§fn blocking_flush<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<OutputStream>,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn blocking_flush<'life0, 'async_trait>(
&'life0 mut self,
stream: Resource<OutputStream>,
) -> Pin<Box<dyn Future<Output = StreamResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Request to flush buffered output, and block until flush completes
and stream is ready for writing again.
source§fn splice(
&mut self,
dest: Resource<OutputStream>,
src: Resource<InputStream>,
len: u64,
) -> StreamResult<u64>
fn splice( &mut self, dest: Resource<OutputStream>, src: Resource<InputStream>, len: u64, ) -> StreamResult<u64>
Read from one stream and write to another. Read more
source§fn blocking_splice<'life0, 'async_trait>(
&'life0 mut self,
dest: Resource<OutputStream>,
src: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = StreamResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn blocking_splice<'life0, 'async_trait>(
&'life0 mut self,
dest: Resource<OutputStream>,
src: Resource<InputStream>,
len: u64,
) -> Pin<Box<dyn Future<Output = StreamResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read from one stream and write to another, with blocking. Read more
source§impl<T> HostOutputStream for WasiImpl<T>where
T: WasiView,
impl<T> HostOutputStream for WasiImpl<T>where
T: WasiView,
fn drop(&mut self, stream: Resource<OutputStream>) -> Result<()>
source§fn check_write(&mut self, stream: Resource<OutputStream>) -> StreamResult<u64>
fn check_write(&mut self, stream: Resource<OutputStream>) -> StreamResult<u64>
Check readiness for writing. This function never blocks. Read more
source§fn write(
&mut self,
stream: Resource<OutputStream>,
bytes: Vec<u8>,
) -> StreamResult<()>
fn write( &mut self, stream: Resource<OutputStream>, bytes: Vec<u8>, ) -> StreamResult<()>
Perform a write. This function never blocks. Read more
source§fn blocking_write_and_flush(
&mut self,
stream: Resource<OutputStream>,
bytes: Vec<u8>,
) -> StreamResult<()>
fn blocking_write_and_flush( &mut self, stream: Resource<OutputStream>, bytes: Vec<u8>, ) -> StreamResult<()>
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<OutputStream>,
len: u64,
) -> StreamResult<()>
fn blocking_write_zeroes_and_flush( &mut self, stream: Resource<OutputStream>, len: u64, ) -> StreamResult<()>
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<OutputStream>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, stream: Resource<OutputStream>, ) -> Result<Resource<Pollable>>
Create a
pollable
which will resolve once the output-stream
is ready for more writing, or an error has occurred. 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<OutputStream>,
len: u64,
) -> StreamResult<()>
fn write_zeroes( &mut self, stream: Resource<OutputStream>, len: u64, ) -> StreamResult<()>
Write zeroes to a stream. Read more
source§fn flush(&mut self, stream: Resource<OutputStream>) -> StreamResult<()>
fn flush(&mut self, stream: Resource<OutputStream>) -> StreamResult<()>
Request to flush buffered output. This function never blocks. Read more
source§fn blocking_flush(&mut self, stream: Resource<OutputStream>) -> StreamResult<()>
fn blocking_flush(&mut self, stream: Resource<OutputStream>) -> StreamResult<()>
Request to flush buffered output, and block until flush completes
and stream is ready for writing again.
source§fn splice(
&mut self,
dst: Resource<OutputStream>,
src: Resource<InputStream>,
len: u64,
) -> StreamResult<u64>
fn splice( &mut self, dst: Resource<OutputStream>, src: Resource<InputStream>, len: u64, ) -> StreamResult<u64>
Read from one stream and write to another. Read more
source§fn blocking_splice(
&mut self,
dst: Resource<OutputStream>,
src: Resource<InputStream>,
len: u64,
) -> StreamResult<u64>
fn blocking_splice( &mut self, dst: Resource<OutputStream>, src: Resource<InputStream>, len: u64, ) -> StreamResult<u64>
Read from one stream and write to another, with blocking. Read more
source§impl<T> HostPollable for WasiImpl<T>where
T: WasiView,
impl<T> HostPollable for WasiImpl<T>where
T: WasiView,
source§fn block<'life0, 'async_trait>(
&'life0 mut self,
pollable: Resource<Pollable>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn block<'life0, 'async_trait>(
&'life0 mut self,
pollable: Resource<Pollable>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: '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>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ready<'life0, 'async_trait>(
&'life0 mut self,
pollable: Resource<Pollable>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return the readiness of a pollable. This function never blocks. Read more
fn drop(&mut self, pollable: Resource<Pollable>) -> Result<()>
source§impl<T> HostPollable for WasiImpl<T>where
T: WasiView,
impl<T> HostPollable for WasiImpl<T>where
T: WasiView,
source§fn ready(&mut self, pollable: Resource<Pollable>) -> Result<bool>
fn ready(&mut self, pollable: Resource<Pollable>) -> Result<bool>
Return the readiness of a pollable. This function never blocks. Read more
source§fn block(&mut self, pollable: Resource<Pollable>) -> Result<()>
fn block(&mut self, pollable: Resource<Pollable>) -> Result<()>
block
returns immediately if the pollable is ready, and otherwise
blocks until ready. Read morefn drop(&mut self, pollable: Resource<Pollable>) -> Result<()>
source§impl<T> HostResolveAddressStream for WasiImpl<T>where
T: WasiView,
impl<T> HostResolveAddressStream for WasiImpl<T>where
T: WasiView,
source§fn resolve_next_address(
&mut self,
resource: Resource<ResolveAddressStream>,
) -> Result<Option<IpAddress>, SocketError>
fn resolve_next_address( &mut self, resource: Resource<ResolveAddressStream>, ) -> Result<Option<IpAddress>, SocketError>
Returns the next address from the resolver. Read more
source§fn subscribe(
&mut self,
resource: Resource<ResolveAddressStream>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, resource: Resource<ResolveAddressStream>, ) -> Result<Resource<Pollable>>
Create a
pollable
which will resolve once the stream is ready for I/O. Read morefn drop(&mut self, resource: Resource<ResolveAddressStream>) -> Result<()>
source§impl<T> HostTcpSocket for WasiImpl<T>where
T: WasiView,
impl<T> HostTcpSocket for WasiImpl<T>where
T: WasiView,
source§fn start_bind<'life0, 'async_trait>(
&'life0 mut self,
this: Resource<TcpSocket>,
network: Resource<Network>,
local_address: IpSocketAddress,
) -> Pin<Box<dyn Future<Output = SocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_bind<'life0, 'async_trait>(
&'life0 mut self,
this: Resource<TcpSocket>,
network: Resource<Network>,
local_address: IpSocketAddress,
) -> Pin<Box<dyn Future<Output = SocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Bind the socket to a specific network on the provided IP address and port. Read more
fn finish_bind(&mut self, this: Resource<TcpSocket>) -> SocketResult<()>
source§fn start_connect<'life0, 'async_trait>(
&'life0 mut self,
this: Resource<TcpSocket>,
network: Resource<Network>,
remote_address: IpSocketAddress,
) -> Pin<Box<dyn Future<Output = SocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_connect<'life0, 'async_trait>(
&'life0 mut self,
this: Resource<TcpSocket>,
network: Resource<Network>,
remote_address: IpSocketAddress,
) -> Pin<Box<dyn Future<Output = SocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Connect to a remote endpoint. Read more
fn finish_connect( &mut self, this: Resource<TcpSocket>, ) -> SocketResult<(Resource<InputStream>, Resource<OutputStream>)>
source§fn start_listen(&mut self, this: Resource<TcpSocket>) -> SocketResult<()>
fn start_listen(&mut self, this: Resource<TcpSocket>) -> SocketResult<()>
Start listening for new connections. Read more
fn finish_listen(&mut self, this: Resource<TcpSocket>) -> SocketResult<()>
source§fn accept(
&mut self,
this: Resource<TcpSocket>,
) -> SocketResult<(Resource<TcpSocket>, Resource<InputStream>, Resource<OutputStream>)>
fn accept( &mut self, this: Resource<TcpSocket>, ) -> SocketResult<(Resource<TcpSocket>, Resource<InputStream>, Resource<OutputStream>)>
Accept a new client socket. Read more
source§fn local_address(
&mut self,
this: Resource<TcpSocket>,
) -> SocketResult<IpSocketAddress>
fn local_address( &mut self, this: Resource<TcpSocket>, ) -> SocketResult<IpSocketAddress>
Get the bound local address. Read more
source§fn remote_address(
&mut self,
this: Resource<TcpSocket>,
) -> SocketResult<IpSocketAddress>
fn remote_address( &mut self, this: Resource<TcpSocket>, ) -> SocketResult<IpSocketAddress>
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,
) -> SocketResult<()>
fn set_listen_backlog_size( &mut self, this: Resource<TcpSocket>, value: u64, ) -> SocketResult<()>
Hints the desired listen queue size. Implementations are free to ignore this. Read more
source§fn keep_alive_enabled(
&mut self,
this: Resource<TcpSocket>,
) -> SocketResult<bool>
fn keep_alive_enabled( &mut self, this: Resource<TcpSocket>, ) -> SocketResult<bool>
Enables or disables keepalive. Read more
fn set_keep_alive_enabled( &mut self, this: Resource<TcpSocket>, value: bool, ) -> SocketResult<()>
source§fn keep_alive_idle_time(
&mut self,
this: Resource<TcpSocket>,
) -> SocketResult<u64>
fn keep_alive_idle_time( &mut self, this: Resource<TcpSocket>, ) -> SocketResult<u64>
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, ) -> SocketResult<()>
source§fn keep_alive_interval(
&mut self,
this: Resource<TcpSocket>,
) -> SocketResult<u64>
fn keep_alive_interval( &mut self, this: Resource<TcpSocket>, ) -> SocketResult<u64>
The time between keepalive packets. Read more
fn set_keep_alive_interval( &mut self, this: Resource<TcpSocket>, value: u64, ) -> SocketResult<()>
source§fn keep_alive_count(&mut self, this: Resource<TcpSocket>) -> SocketResult<u32>
fn keep_alive_count(&mut self, this: Resource<TcpSocket>) -> SocketResult<u32>
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, ) -> SocketResult<()>
source§fn hop_limit(&mut self, this: Resource<TcpSocket>) -> SocketResult<u8>
fn hop_limit(&mut self, this: Resource<TcpSocket>) -> SocketResult<u8>
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. Read more
fn set_hop_limit( &mut self, this: Resource<TcpSocket>, value: u8, ) -> SocketResult<()>
source§fn receive_buffer_size(
&mut self,
this: Resource<TcpSocket>,
) -> SocketResult<u64>
fn receive_buffer_size( &mut self, this: Resource<TcpSocket>, ) -> SocketResult<u64>
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, ) -> SocketResult<()>
fn send_buffer_size(&mut self, this: Resource<TcpSocket>) -> SocketResult<u64>
fn set_send_buffer_size( &mut self, this: Resource<TcpSocket>, value: u64, ) -> SocketResult<()>
source§fn subscribe(&mut self, this: Resource<TcpSocket>) -> Result<Resource<Pollable>>
fn subscribe(&mut self, this: Resource<TcpSocket>) -> Result<Resource<Pollable>>
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,
) -> SocketResult<()>
fn shutdown( &mut self, this: Resource<TcpSocket>, shutdown_type: ShutdownType, ) -> SocketResult<()>
Initiate a graceful shutdown. Read more
fn drop(&mut self, this: Resource<TcpSocket>) -> Result<(), Error>
source§impl<T> HostTcpSocket for WasiImpl<T>where
T: WasiView,
impl<T> HostTcpSocket for WasiImpl<T>where
T: WasiView,
source§fn start_bind(
&mut self,
self_: Resource<TcpSocket>,
network: Resource<Network>,
local_address: IpSocketAddress,
) -> Result<(), SocketError>
fn start_bind( &mut self, self_: Resource<TcpSocket>, network: Resource<Network>, local_address: IpSocketAddress, ) -> Result<(), SocketError>
Bind the socket to a specific network on the provided IP address and port. Read more
fn finish_bind(&mut self, self_: Resource<TcpSocket>) -> Result<(), SocketError>
source§fn start_connect(
&mut self,
self_: Resource<TcpSocket>,
network: Resource<Network>,
remote_address: IpSocketAddress,
) -> Result<(), SocketError>
fn start_connect( &mut self, self_: Resource<TcpSocket>, network: Resource<Network>, remote_address: IpSocketAddress, ) -> Result<(), SocketError>
Connect to a remote endpoint. Read more
fn finish_connect( &mut self, self_: Resource<TcpSocket>, ) -> Result<(Resource<InputStream>, Resource<OutputStream>), SocketError>
source§fn start_listen(
&mut self,
self_: Resource<TcpSocket>,
) -> Result<(), SocketError>
fn start_listen( &mut self, self_: Resource<TcpSocket>, ) -> Result<(), SocketError>
Start listening for new connections. Read more
fn finish_listen( &mut self, self_: Resource<TcpSocket>, ) -> Result<(), SocketError>
source§fn accept(
&mut self,
self_: Resource<TcpSocket>,
) -> Result<(Resource<TcpSocket>, Resource<InputStream>, Resource<OutputStream>), SocketError>
fn accept( &mut self, self_: Resource<TcpSocket>, ) -> Result<(Resource<TcpSocket>, Resource<InputStream>, Resource<OutputStream>), SocketError>
Accept a new client socket. Read more
source§fn local_address(
&mut self,
self_: Resource<TcpSocket>,
) -> Result<IpSocketAddress, SocketError>
fn local_address( &mut self, self_: Resource<TcpSocket>, ) -> Result<IpSocketAddress, SocketError>
Get the bound local address. Read more
source§fn remote_address(
&mut self,
self_: Resource<TcpSocket>,
) -> Result<IpSocketAddress, SocketError>
fn remote_address( &mut self, self_: Resource<TcpSocket>, ) -> Result<IpSocketAddress, SocketError>
Get the remote address. Read more
source§fn is_listening(&mut self, self_: Resource<TcpSocket>) -> Result<bool>
fn is_listening(&mut self, self_: Resource<TcpSocket>) -> Result<bool>
Whether the socket is in the
listening
state. Read moresource§fn address_family(
&mut self,
self_: Resource<TcpSocket>,
) -> Result<IpAddressFamily>
fn address_family( &mut self, self_: Resource<TcpSocket>, ) -> Result<IpAddressFamily>
Whether this is a IPv4 or IPv6 socket. Read more
source§fn set_listen_backlog_size(
&mut self,
self_: Resource<TcpSocket>,
value: u64,
) -> Result<(), SocketError>
fn set_listen_backlog_size( &mut self, self_: Resource<TcpSocket>, value: u64, ) -> Result<(), SocketError>
Hints the desired listen queue size. Implementations are free to ignore this. Read more
source§fn keep_alive_enabled(
&mut self,
self_: Resource<TcpSocket>,
) -> Result<bool, SocketError>
fn keep_alive_enabled( &mut self, self_: Resource<TcpSocket>, ) -> Result<bool, SocketError>
Enables or disables keepalive. Read more
fn set_keep_alive_enabled( &mut self, self_: Resource<TcpSocket>, value: bool, ) -> Result<(), SocketError>
source§fn keep_alive_idle_time(
&mut self,
self_: Resource<TcpSocket>,
) -> Result<Duration, SocketError>
fn keep_alive_idle_time( &mut self, self_: Resource<TcpSocket>, ) -> Result<Duration, SocketError>
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, self_: Resource<TcpSocket>, value: Duration, ) -> Result<(), SocketError>
source§fn keep_alive_interval(
&mut self,
self_: Resource<TcpSocket>,
) -> Result<Duration, SocketError>
fn keep_alive_interval( &mut self, self_: Resource<TcpSocket>, ) -> Result<Duration, SocketError>
The time between keepalive packets. Read more
fn set_keep_alive_interval( &mut self, self_: Resource<TcpSocket>, value: Duration, ) -> Result<(), SocketError>
source§fn keep_alive_count(
&mut self,
self_: Resource<TcpSocket>,
) -> Result<u32, SocketError>
fn keep_alive_count( &mut self, self_: Resource<TcpSocket>, ) -> Result<u32, SocketError>
The maximum amount of keepalive packets TCP should send before aborting the connection. Read more
fn set_keep_alive_count( &mut self, self_: Resource<TcpSocket>, value: u32, ) -> Result<(), SocketError>
source§fn hop_limit(&mut self, self_: Resource<TcpSocket>) -> Result<u8, SocketError>
fn hop_limit(&mut self, self_: Resource<TcpSocket>) -> Result<u8, SocketError>
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. Read more
fn set_hop_limit( &mut self, self_: Resource<TcpSocket>, value: u8, ) -> Result<(), SocketError>
source§fn receive_buffer_size(
&mut self,
self_: Resource<TcpSocket>,
) -> Result<u64, SocketError>
fn receive_buffer_size( &mut self, self_: Resource<TcpSocket>, ) -> Result<u64, SocketError>
The kernel buffer space reserved for sends/receives on this socket. Read more
fn set_receive_buffer_size( &mut self, self_: Resource<TcpSocket>, value: u64, ) -> Result<(), SocketError>
fn send_buffer_size( &mut self, self_: Resource<TcpSocket>, ) -> Result<u64, SocketError>
fn set_send_buffer_size( &mut self, self_: Resource<TcpSocket>, value: u64, ) -> Result<(), SocketError>
source§fn subscribe(
&mut self,
self_: Resource<TcpSocket>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, self_: Resource<TcpSocket>, ) -> Result<Resource<Pollable>>
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,
self_: Resource<TcpSocket>,
shutdown_type: ShutdownType,
) -> Result<(), SocketError>
fn shutdown( &mut self, self_: Resource<TcpSocket>, shutdown_type: ShutdownType, ) -> Result<(), SocketError>
Initiate a graceful shutdown. Read more
fn drop(&mut self, rep: Resource<TcpSocket>) -> Result<()>
source§impl<T> HostTerminalInput for WasiImpl<T>where
T: WasiView,
impl<T> HostTerminalInput for WasiImpl<T>where
T: WasiView,
source§impl<T> HostTerminalOutput for WasiImpl<T>where
T: WasiView,
impl<T> HostTerminalOutput for WasiImpl<T>where
T: WasiView,
source§impl<T> HostUdpSocket for WasiImpl<T>where
T: WasiView,
impl<T> HostUdpSocket for WasiImpl<T>where
T: WasiView,
source§fn start_bind<'life0, 'async_trait>(
&'life0 mut self,
this: Resource<UdpSocket>,
network: Resource<Network>,
local_address: IpSocketAddress,
) -> Pin<Box<dyn Future<Output = SocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start_bind<'life0, 'async_trait>(
&'life0 mut self,
this: Resource<UdpSocket>,
network: Resource<Network>,
local_address: IpSocketAddress,
) -> Pin<Box<dyn Future<Output = SocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Bind the socket to a specific network on the provided IP address and port. Read more
fn finish_bind(&mut self, this: Resource<UdpSocket>) -> SocketResult<()>
source§fn stream<'life0, 'async_trait>(
&'life0 mut self,
this: Resource<UdpSocket>,
remote_address: Option<IpSocketAddress>,
) -> Pin<Box<dyn Future<Output = SocketResult<(Resource<IncomingDatagramStream>, Resource<OutgoingDatagramStream>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream<'life0, 'async_trait>(
&'life0 mut self,
this: Resource<UdpSocket>,
remote_address: Option<IpSocketAddress>,
) -> Pin<Box<dyn Future<Output = SocketResult<(Resource<IncomingDatagramStream>, Resource<OutgoingDatagramStream>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Set up inbound & outbound communication channels, optionally to a specific peer. Read more
source§fn local_address(
&mut self,
this: Resource<UdpSocket>,
) -> SocketResult<IpSocketAddress>
fn local_address( &mut self, this: Resource<UdpSocket>, ) -> SocketResult<IpSocketAddress>
Get the current bound address. Read more
source§fn remote_address(
&mut self,
this: Resource<UdpSocket>,
) -> SocketResult<IpSocketAddress>
fn remote_address( &mut self, this: Resource<UdpSocket>, ) -> SocketResult<IpSocketAddress>
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>) -> SocketResult<u8>
fn unicast_hop_limit(&mut self, this: Resource<UdpSocket>) -> SocketResult<u8>
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. Read more
fn set_unicast_hop_limit( &mut self, this: Resource<UdpSocket>, value: u8, ) -> SocketResult<()>
source§fn receive_buffer_size(
&mut self,
this: Resource<UdpSocket>,
) -> SocketResult<u64>
fn receive_buffer_size( &mut self, this: Resource<UdpSocket>, ) -> SocketResult<u64>
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, ) -> SocketResult<()>
fn send_buffer_size(&mut self, this: Resource<UdpSocket>) -> SocketResult<u64>
fn set_send_buffer_size( &mut self, this: Resource<UdpSocket>, value: u64, ) -> SocketResult<()>
source§fn subscribe(&mut self, this: Resource<UdpSocket>) -> Result<Resource<Pollable>>
fn subscribe(&mut self, this: Resource<UdpSocket>) -> Result<Resource<Pollable>>
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> HostUdpSocket for WasiImpl<T>where
T: WasiView,
impl<T> HostUdpSocket for WasiImpl<T>where
T: WasiView,
source§fn start_bind(
&mut self,
self_: Resource<UdpSocket>,
network: Resource<Network>,
local_address: IpSocketAddress,
) -> Result<(), SocketError>
fn start_bind( &mut self, self_: Resource<UdpSocket>, network: Resource<Network>, local_address: IpSocketAddress, ) -> Result<(), SocketError>
Bind the socket to a specific network on the provided IP address and port. Read more
fn finish_bind(&mut self, self_: Resource<UdpSocket>) -> Result<(), SocketError>
source§fn stream(
&mut self,
self_: Resource<UdpSocket>,
remote_address: Option<IpSocketAddress>,
) -> Result<(Resource<IncomingDatagramStream>, Resource<OutgoingDatagramStream>), SocketError>
fn stream( &mut self, self_: Resource<UdpSocket>, remote_address: Option<IpSocketAddress>, ) -> Result<(Resource<IncomingDatagramStream>, Resource<OutgoingDatagramStream>), SocketError>
Set up inbound & outbound communication channels, optionally to a specific peer. Read more
source§fn local_address(
&mut self,
self_: Resource<UdpSocket>,
) -> Result<IpSocketAddress, SocketError>
fn local_address( &mut self, self_: Resource<UdpSocket>, ) -> Result<IpSocketAddress, SocketError>
Get the current bound address. Read more
source§fn remote_address(
&mut self,
self_: Resource<UdpSocket>,
) -> Result<IpSocketAddress, SocketError>
fn remote_address( &mut self, self_: Resource<UdpSocket>, ) -> Result<IpSocketAddress, SocketError>
Get the address the socket is currently streaming to. Read more
source§fn address_family(
&mut self,
self_: Resource<UdpSocket>,
) -> Result<IpAddressFamily>
fn address_family( &mut self, self_: Resource<UdpSocket>, ) -> Result<IpAddressFamily>
Whether this is a IPv4 or IPv6 socket. Read more
source§fn unicast_hop_limit(
&mut self,
self_: Resource<UdpSocket>,
) -> Result<u8, SocketError>
fn unicast_hop_limit( &mut self, self_: Resource<UdpSocket>, ) -> Result<u8, SocketError>
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. Read more
fn set_unicast_hop_limit( &mut self, self_: Resource<UdpSocket>, value: u8, ) -> Result<(), SocketError>
source§fn receive_buffer_size(
&mut self,
self_: Resource<UdpSocket>,
) -> Result<u64, SocketError>
fn receive_buffer_size( &mut self, self_: Resource<UdpSocket>, ) -> Result<u64, SocketError>
The kernel buffer space reserved for sends/receives on this socket. Read more
fn set_receive_buffer_size( &mut self, self_: Resource<UdpSocket>, value: u64, ) -> Result<(), SocketError>
fn send_buffer_size( &mut self, self_: Resource<UdpSocket>, ) -> Result<u64, SocketError>
fn set_send_buffer_size( &mut self, self_: Resource<UdpSocket>, value: u64, ) -> Result<(), SocketError>
source§fn subscribe(
&mut self,
self_: Resource<UdpSocket>,
) -> Result<Resource<Pollable>>
fn subscribe( &mut self, self_: Resource<UdpSocket>, ) -> Result<Resource<Pollable>>
Create a
pollable
which will resolve once the socket is ready for I/O. Read morefn drop(&mut self, rep: Resource<UdpSocket>) -> Result<()>
impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
impl<T> Host for WasiImpl<T>where
T: WasiView,
Auto Trait Implementations§
impl<T> Freeze for WasiImpl<T>where
T: Freeze,
impl<T> RefUnwindSafe for WasiImpl<T>where
T: RefUnwindSafe,
impl<T> Send for WasiImpl<T>where
T: Send,
impl<T> Sync for WasiImpl<T>where
T: Sync,
impl<T> Unpin for WasiImpl<T>where
T: Unpin,
impl<T> UnwindSafe for WasiImpl<T>where
T: UnwindSafe,
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> 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