pub struct WasiCtxNamedView<'a, T>(pub &'a mut T);Expand description
A helper structure by which to implement generated-Host traits for
bindings corresponding to named imports.
This is an implementation detail of how named imports are organized.
Embedders invoking generated add_to_linker functions directly will be
required to create this structure directly. Otherwise you probably won’t
need to interact with this.
Tuple Fields§
§0: &'a mut TTrait Implementations§
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiClocksNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiClocksNamedView,
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiClocksNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiClocksNamedView,
Source§fn now(&mut self, id: NamedId) -> Result<Instant>
fn now(&mut self, id: NamedId) -> Result<Instant>
Read the current value of the clock. Read more
Source§fn resolution(&mut self, id: NamedId) -> Result<Instant>
fn resolution(&mut self, id: NamedId) -> Result<Instant>
Query the resolution of the clock. Returns the duration of time
corresponding to a clock tick.
Source§fn subscribe_instant(
&mut self,
id: NamedId,
when: Instant,
) -> Result<Resource<DynPollable>>
fn subscribe_instant( &mut self, id: NamedId, when: Instant, ) -> Result<Resource<DynPollable>>
Create a
pollable which will resolve once the specified instant
has occurred.Source§fn subscribe_duration(
&mut self,
id: NamedId,
duration: WasiDuration,
) -> Result<Resource<DynPollable>>
fn subscribe_duration( &mut self, id: NamedId, duration: WasiDuration, ) -> Result<Resource<DynPollable>>
Create a
pollable that will resolve after the specified duration has
elapsed from the time this function is invoked.Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
Source§fn get_directories(
&mut self,
id: NamedId,
) -> Result<Vec<(Resource<Descriptor>, String)>>
fn get_directories( &mut self, id: NamedId, ) -> Result<Vec<(Resource<Descriptor>, String)>>
Return the set of preopened directories, and their paths.
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
fn convert_error_code(&mut self, error: SocketError) -> Result<ErrorCode>
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
fn convert_error_code(&mut self, err: SocketError) -> Result<ErrorCode>
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
fn convert_error_code(&mut self, err: SocketError) -> Result<ErrorCode>
Source§fn create_tcp_socket(
&mut self,
id: NamedId,
address_family: IpAddressFamily,
) -> SocketResult<Resource<TcpSocket>>
fn create_tcp_socket( &mut self, id: NamedId, address_family: IpAddressFamily, ) -> SocketResult<Resource<TcpSocket>>
Create a new TCP socket. Read more
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
fn convert_error_code(&mut self, err: SocketError) -> Result<ErrorCode>
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
fn convert_error_code(&mut self, err: SocketError) -> Result<ErrorCode>
Source§async fn create_udp_socket(
&mut self,
id: NamedId,
address_family: IpAddressFamily,
) -> SocketResult<Resource<UdpSocket>>
async fn create_udp_socket( &mut self, id: NamedId, address_family: IpAddressFamily, ) -> SocketResult<Resource<UdpSocket>>
Create a new UDP socket. Read more
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
fn convert_error_code(&mut self, err: SocketError) -> Result<ErrorCode>
Source§fn resolve_addresses(
&mut self,
id: NamedId,
network: Resource<Network>,
name: String,
) -> Result<Resource<ResolveAddressStream>, SocketError>
fn resolve_addresses( &mut self, id: NamedId, 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 WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
fn get_stdout( &mut self, id: NamedId, ) -> Result<Resource<DynOutputStream>, Error>
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
fn get_stderr( &mut self, id: NamedId, ) -> Result<Resource<DynOutputStream>, Error>
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Source§fn get_terminal_stdin(
&mut self,
id: NamedId,
) -> Result<Option<Resource<TerminalInput>>>
fn get_terminal_stdin( &mut self, id: NamedId, ) -> 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 WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Source§fn get_terminal_stdout(
&mut self,
id: NamedId,
) -> Result<Option<Resource<TerminalOutput>>>
fn get_terminal_stdout( &mut self, id: NamedId, ) -> 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 WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Source§fn get_terminal_stderr(
&mut self,
id: NamedId,
) -> Result<Option<Resource<TerminalOutput>>>
fn get_terminal_stderr( &mut self, id: NamedId, ) -> 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 WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.Source§fn get_terminal_stdin(
&mut self,
id: NamedId,
) -> Result<Option<Resource<TerminalInput>>>
fn get_terminal_stdin( &mut self, id: NamedId, ) -> 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 WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.Source§fn get_terminal_stdout(
&mut self,
id: NamedId,
) -> Result<Option<Resource<TerminalOutput>>>
fn get_terminal_stdout( &mut self, id: NamedId, ) -> 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 WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.Source§fn get_terminal_stderr(
&mut self,
id: NamedId,
) -> Result<Option<Resource<TerminalOutput>>>
fn get_terminal_stderr( &mut self, id: NamedId, ) -> Result<Option<Resource<TerminalOutput>>>
If stderr is connected to a terminal, return a
terminal-output handle
allowing further interaction with it.impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiClocksNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiClocksNamedView,
Available on crate feature
p3 only.Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiClocksNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiClocksNamedView,
Available on crate feature
p3 only.Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
Available on crate feature
p3 only.fn convert_error_code(&mut self, error: FilesystemError) -> Result<ErrorCode>
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
Available on crate feature
p3 only.Source§fn get_directories(
&mut self,
id: NamedId,
) -> Result<Vec<(Resource<Descriptor>, String)>>
fn get_directories( &mut self, id: NamedId, ) -> Result<Vec<(Resource<Descriptor>, String)>>
Return the set of preopened directories, and their paths.
Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
Available on crate feature
p3 only.Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
Available on crate feature
p3 only.Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiRandomNamedView,
Available on crate feature
p3 only.impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Available on crate feature
p3 only.Source§impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Available on crate feature p3 only.
impl<T> Host for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Available on crate feature
p3 only.fn convert_error_code(&mut self, error: SocketError) -> Result<ErrorCode>
Source§impl<T> HostDescriptor for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
impl<T> HostDescriptor for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
Source§async fn advise(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
offset: Filesize,
len: Filesize,
advice: Advice,
) -> FsResult<()>
async fn advise( &mut self, id: NamedId, fd: Resource<Descriptor>, offset: Filesize, len: Filesize, advice: Advice, ) -> FsResult<()>
Provide file advisory information on a descriptor. Read more
Source§async fn sync_data(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
) -> FsResult<()>
async fn sync_data( &mut self, id: NamedId, fd: Resource<Descriptor>, ) -> FsResult<()>
Synchronize the data of a file to disk. Read more
Source§async fn get_flags(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
) -> FsResult<DescriptorFlags>
async fn get_flags( &mut self, id: NamedId, fd: Resource<Descriptor>, ) -> FsResult<DescriptorFlags>
Get flags associated with a descriptor. Read more
Source§async fn get_type(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
) -> FsResult<DescriptorType>
async fn get_type( &mut self, id: NamedId, fd: Resource<Descriptor>, ) -> FsResult<DescriptorType>
Get the dynamic type of a descriptor. Read more
Source§async fn set_size(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
size: Filesize,
) -> FsResult<()>
async fn set_size( &mut self, id: NamedId, fd: Resource<Descriptor>, size: Filesize, ) -> FsResult<()>
Adjust the size of an open file. If this increases the file’s size, the
extra bytes are filled with zeros. Read more
Source§async fn set_times(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
atim: NewTimestamp,
mtim: NewTimestamp,
) -> FsResult<()>
async fn set_times( &mut self, id: NamedId, fd: Resource<Descriptor>, atim: NewTimestamp, mtim: NewTimestamp, ) -> FsResult<()>
Adjust the timestamps of an open file or directory. Read more
Source§async fn read(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
len: Filesize,
offset: Filesize,
) -> FsResult<(Vec<u8>, bool)>
async fn read( &mut self, id: NamedId, fd: Resource<Descriptor>, len: Filesize, offset: Filesize, ) -> FsResult<(Vec<u8>, bool)>
Read from a descriptor, without using and updating the descriptor’s offset. Read more
Source§async fn write(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
buf: Vec<u8>,
offset: Filesize,
) -> FsResult<Filesize>
async fn write( &mut self, id: NamedId, fd: Resource<Descriptor>, buf: Vec<u8>, offset: Filesize, ) -> FsResult<Filesize>
Write to a descriptor, without using and updating the descriptor’s offset. Read more
Source§async fn read_directory(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
) -> FsResult<Resource<DirectoryEntryStream>>
async fn read_directory( &mut self, id: NamedId, fd: Resource<Descriptor>, ) -> FsResult<Resource<DirectoryEntryStream>>
Read directory entries from a directory. Read more
Source§async fn sync(&mut self, id: NamedId, fd: Resource<Descriptor>) -> FsResult<()>
async fn sync(&mut self, id: NamedId, fd: Resource<Descriptor>) -> FsResult<()>
Synchronize the data and metadata of a file to disk. Read more
Source§async fn create_directory_at(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
path: String,
) -> FsResult<()>
async fn create_directory_at( &mut self, id: NamedId, fd: Resource<Descriptor>, path: String, ) -> FsResult<()>
Create a directory. Read more
Source§async fn stat(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
) -> FsResult<DescriptorStat>
async fn stat( &mut self, id: NamedId, fd: Resource<Descriptor>, ) -> FsResult<DescriptorStat>
Return the attributes of an open file or directory. Read more
Source§async fn stat_at(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
) -> FsResult<DescriptorStat>
async fn stat_at( &mut self, id: NamedId, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, ) -> FsResult<DescriptorStat>
Return the attributes of a file or directory. Read more
Source§async fn set_times_at(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
atim: NewTimestamp,
mtim: NewTimestamp,
) -> FsResult<()>
async fn set_times_at( &mut self, id: NamedId, fd: Resource<Descriptor>, path_flags: PathFlags, path: String, atim: NewTimestamp, mtim: NewTimestamp, ) -> FsResult<()>
Adjust the timestamps of a file or directory. Read more
Source§async fn link_at(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
old_path_flags: PathFlags,
old_path: String,
new_descriptor: Resource<Descriptor>,
new_path: String,
) -> FsResult<()>
async fn link_at( &mut self, id: NamedId, 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§async fn open_at(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
oflags: OpenFlags,
flags: DescriptorFlags,
) -> FsResult<Resource<Descriptor>>
async fn open_at( &mut self, id: NamedId, 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, id: NamedId, fd: Resource<Descriptor>) -> Result<()>
Source§async fn readlink_at(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
path: String,
) -> FsResult<String>
async fn readlink_at( &mut self, id: NamedId, fd: Resource<Descriptor>, path: String, ) -> FsResult<String>
Read the contents of a symbolic link. Read more
Source§async fn remove_directory_at(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
path: String,
) -> FsResult<()>
async fn remove_directory_at( &mut self, id: NamedId, fd: Resource<Descriptor>, path: String, ) -> FsResult<()>
Remove a directory. Read more
Source§async fn rename_at(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
old_path: String,
new_fd: Resource<Descriptor>,
new_path: String,
) -> FsResult<()>
async fn rename_at( &mut self, id: NamedId, fd: Resource<Descriptor>, old_path: String, new_fd: Resource<Descriptor>, new_path: String, ) -> FsResult<()>
Rename a filesystem object. Read more
Source§async fn symlink_at(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
src_path: String,
dest_path: String,
) -> FsResult<()>
async fn symlink_at( &mut self, id: NamedId, fd: Resource<Descriptor>, src_path: String, dest_path: String, ) -> FsResult<()>
Create a symbolic link (also known as a “symlink”). Read more
Source§async fn unlink_file_at(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
path: String,
) -> FsResult<()>
async fn unlink_file_at( &mut self, id: NamedId, fd: Resource<Descriptor>, path: String, ) -> FsResult<()>
Unlink a filesystem object that is not a directory. Read more
Source§fn read_via_stream(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
offset: Filesize,
) -> FsResult<Resource<DynInputStream>>
fn read_via_stream( &mut self, id: NamedId, fd: Resource<Descriptor>, offset: Filesize, ) -> FsResult<Resource<DynInputStream>>
Return a stream for reading from a file, if available. Read more
Source§fn write_via_stream(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
offset: Filesize,
) -> FsResult<Resource<DynOutputStream>>
fn write_via_stream( &mut self, id: NamedId, fd: Resource<Descriptor>, offset: Filesize, ) -> FsResult<Resource<DynOutputStream>>
Return a stream for writing to a file, if available. Read more
Source§fn append_via_stream(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
) -> FsResult<Resource<DynOutputStream>>
fn append_via_stream( &mut self, id: NamedId, fd: Resource<Descriptor>, ) -> FsResult<Resource<DynOutputStream>>
Return a stream for appending to a file, if available. Read more
Source§async fn is_same_object(
&mut self,
id: NamedId,
a: Resource<Descriptor>,
b: Resource<Descriptor>,
) -> Result<bool>
async fn is_same_object( &mut self, id: NamedId, a: Resource<Descriptor>, b: Resource<Descriptor>, ) -> Result<bool>
Test whether two descriptors refer to the same filesystem object. Read more
Source§async fn metadata_hash(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
) -> FsResult<MetadataHashValue>
async fn metadata_hash( &mut self, id: NamedId, fd: Resource<Descriptor>, ) -> FsResult<MetadataHashValue>
Return a hash of the metadata associated with a filesystem object referred
to by a descriptor. Read more
Source§async fn metadata_hash_at(
&mut self,
id: NamedId,
fd: Resource<Descriptor>,
path_flags: PathFlags,
path: String,
) -> FsResult<MetadataHashValue>
async fn metadata_hash_at( &mut self, id: NamedId, 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 WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
Available on crate feature p3 only.
impl<T> HostDescriptor for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
Available on crate feature
p3 only.Source§impl<T> HostDirectoryEntryStream for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
impl<T> HostDirectoryEntryStream for WasiCtxNamedView<'_, T>where
T: WasiFilesystemNamedView,
Source§async fn read_directory_entry(
&mut self,
id: NamedId,
stream: Resource<DirectoryEntryStream>,
) -> FsResult<Option<DirectoryEntry>>
async fn read_directory_entry( &mut self, id: NamedId, stream: Resource<DirectoryEntryStream>, ) -> FsResult<Option<DirectoryEntry>>
Read a single directory entry from a
directory-entry-stream.fn drop( &mut self, id: NamedId, stream: Resource<DirectoryEntryStream>, ) -> Result<()>
Source§impl<T> HostIncomingDatagramStream for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> HostIncomingDatagramStream for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Source§fn receive(
&mut self,
id: NamedId,
this: Resource<IncomingDatagramStream>,
max_results: u64,
) -> SocketResult<Vec<IncomingDatagram>>
fn receive( &mut self, id: NamedId, this: Resource<IncomingDatagramStream>, max_results: u64, ) -> SocketResult<Vec<IncomingDatagram>>
Receive messages on the socket. Read more
Source§fn subscribe(
&mut self,
id: NamedId,
this: Resource<IncomingDatagramStream>,
) -> Result<Resource<DynPollable>>
fn subscribe( &mut self, id: NamedId, this: Resource<IncomingDatagramStream>, ) -> Result<Resource<DynPollable>>
Create a
pollable which will resolve once the stream is ready to receive again. Read moreasync fn drop( &mut self, id: NamedId, this: Resource<IncomingDatagramStream>, ) -> Result<(), Error>
Source§impl<T> HostNetwork for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> HostNetwork for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Source§impl<T> HostOutgoingDatagramStream for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> HostOutgoingDatagramStream for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Source§fn check_send(
&mut self,
id: NamedId,
this: Resource<OutgoingDatagramStream>,
) -> SocketResult<u64>
fn check_send( &mut self, id: NamedId, this: Resource<OutgoingDatagramStream>, ) -> SocketResult<u64>
Check readiness for sending. This function never blocks. Read more
Source§fn send(
&mut self,
id: NamedId,
this: Resource<OutgoingDatagramStream>,
datagrams: Vec<OutgoingDatagram>,
) -> SocketResult<u64>
fn send( &mut self, id: NamedId, this: Resource<OutgoingDatagramStream>, datagrams: Vec<OutgoingDatagram>, ) -> SocketResult<u64>
Send messages on the socket. Read more
Source§fn subscribe(
&mut self,
id: NamedId,
this: Resource<OutgoingDatagramStream>,
) -> Result<Resource<DynPollable>>
fn subscribe( &mut self, id: NamedId, this: Resource<OutgoingDatagramStream>, ) -> Result<Resource<DynPollable>>
Create a
pollable which will resolve once the stream is ready to send again. Read moreasync fn drop( &mut self, id: NamedId, this: Resource<OutgoingDatagramStream>, ) -> Result<(), Error>
Source§impl<T> HostResolveAddressStream for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> HostResolveAddressStream for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Source§fn resolve_next_address(
&mut self,
id: NamedId,
resource: Resource<ResolveAddressStream>,
) -> Result<Option<IpAddress>, SocketError>
fn resolve_next_address( &mut self, id: NamedId, resource: Resource<ResolveAddressStream>, ) -> Result<Option<IpAddress>, SocketError>
Returns the next address from the resolver. Read more
Source§fn subscribe(
&mut self,
id: NamedId,
resource: Resource<ResolveAddressStream>,
) -> Result<Resource<DynPollable>>
fn subscribe( &mut self, id: NamedId, resource: Resource<ResolveAddressStream>, ) -> Result<Resource<DynPollable>>
Create a
pollable which will resolve once the stream is ready for I/O. Read moreasync fn drop( &mut self, id: NamedId, resource: Resource<ResolveAddressStream>, ) -> Result<()>
Source§impl<T> HostTcpSocket for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> HostTcpSocket for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Source§async fn start_bind(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
network: Resource<Network>,
local_address: IpSocketAddress,
) -> SocketResult<()>
async fn start_bind( &mut self, id: NamedId, this: Resource<TcpSocket>, network: Resource<Network>, local_address: IpSocketAddress, ) -> SocketResult<()>
Bind the socket to a specific network on the provided IP address and port. Read more
fn finish_bind( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> SocketResult<()>
Source§fn start_connect(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
network: Resource<Network>,
remote_address: IpSocketAddress,
) -> SocketResult<()>
fn start_connect( &mut self, id: NamedId, this: Resource<TcpSocket>, network: Resource<Network>, remote_address: IpSocketAddress, ) -> SocketResult<()>
Connect to a remote endpoint. Read more
fn finish_connect( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> SocketResult<(Resource<DynInputStream>, Resource<DynOutputStream>)>
Source§async fn start_listen(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> SocketResult<()>
async fn start_listen( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> SocketResult<()>
Start listening for new connections. Read more
fn finish_listen( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> SocketResult<()>
Source§fn accept(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> SocketResult<(Resource<TcpSocket>, Resource<DynInputStream>, Resource<DynOutputStream>)>
fn accept( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> SocketResult<(Resource<TcpSocket>, Resource<DynInputStream>, Resource<DynOutputStream>)>
Accept a new client socket. Read more
Source§fn local_address(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> SocketResult<IpSocketAddress>
fn local_address( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> SocketResult<IpSocketAddress>
Get the bound local address. Read more
Source§fn remote_address(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> SocketResult<IpSocketAddress>
fn remote_address( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> SocketResult<IpSocketAddress>
Get the remote address. Read more
Source§fn is_listening(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> Result<bool, Error>
fn is_listening( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> Result<bool, Error>
Whether the socket is in the
listening state. Read moreSource§fn address_family(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> Result<IpAddressFamily, Error>
fn address_family( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> Result<IpAddressFamily, Error>
Whether this is a IPv4 or IPv6 socket. Read more
Source§fn set_listen_backlog_size(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
value: u64,
) -> SocketResult<()>
fn set_listen_backlog_size( &mut self, id: NamedId, 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,
id: NamedId,
this: Resource<TcpSocket>,
) -> SocketResult<bool>
fn keep_alive_enabled( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> SocketResult<bool>
Enables or disables keepalive. Read more
fn set_keep_alive_enabled( &mut self, id: NamedId, this: Resource<TcpSocket>, value: bool, ) -> SocketResult<()>
Source§fn keep_alive_idle_time(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> SocketResult<u64>
fn keep_alive_idle_time( &mut self, id: NamedId, 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, id: NamedId, this: Resource<TcpSocket>, value: u64, ) -> SocketResult<()>
Source§fn keep_alive_interval(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> SocketResult<u64>
fn keep_alive_interval( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> SocketResult<u64>
The time between keepalive packets. Read more
fn set_keep_alive_interval( &mut self, id: NamedId, this: Resource<TcpSocket>, value: u64, ) -> SocketResult<()>
Source§fn keep_alive_count(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> SocketResult<u32>
fn keep_alive_count( &mut self, id: NamedId, 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, id: NamedId, this: Resource<TcpSocket>, value: u32, ) -> SocketResult<()>
Source§fn hop_limit(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> SocketResult<u8>
fn hop_limit( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> SocketResult<u8>
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. Read more
fn set_hop_limit( &mut self, id: NamedId, this: Resource<TcpSocket>, value: u8, ) -> SocketResult<()>
Source§fn receive_buffer_size(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> SocketResult<u64>
fn receive_buffer_size( &mut self, id: NamedId, 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, id: NamedId, this: Resource<TcpSocket>, value: u64, ) -> SocketResult<()>
fn send_buffer_size( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> SocketResult<u64>
fn set_send_buffer_size( &mut self, id: NamedId, this: Resource<TcpSocket>, value: u64, ) -> SocketResult<()>
Source§fn subscribe(
&mut self,
id: NamedId,
this: Resource<TcpSocket>,
) -> Result<Resource<DynPollable>>
fn subscribe( &mut self, id: NamedId, this: Resource<TcpSocket>, ) -> Result<Resource<DynPollable>>
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,
id: NamedId,
this: Resource<TcpSocket>,
shutdown_type: ShutdownType,
) -> SocketResult<()>
fn shutdown( &mut self, id: NamedId, this: Resource<TcpSocket>, shutdown_type: ShutdownType, ) -> SocketResult<()>
Initiate a graceful shutdown. Read more
fn drop(&mut self, id: NamedId, this: Resource<TcpSocket>) -> Result<(), Error>
Source§impl<T> HostTcpSocket for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Available on crate feature p3 only.
impl<T> HostTcpSocket for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Available on crate feature
p3 only.Source§async fn bind(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
local_address: IpSocketAddress,
) -> SocketResult<()>
async fn bind( &mut self, id: NamedId, socket: Resource<TcpSocket>, local_address: IpSocketAddress, ) -> SocketResult<()>
Bind the socket to the provided IP address and port. Read more
Source§fn create(
&mut self,
id: NamedId,
address_family: IpAddressFamily,
) -> SocketResult<Resource<TcpSocket>>
fn create( &mut self, id: NamedId, address_family: IpAddressFamily, ) -> SocketResult<Resource<TcpSocket>>
Create a new TCP socket. Read more
Source§fn get_local_address(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
) -> SocketResult<IpSocketAddress>
fn get_local_address( &mut self, id: NamedId, socket: Resource<TcpSocket>, ) -> SocketResult<IpSocketAddress>
Get the bound local address. Read more
Source§fn get_remote_address(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
) -> SocketResult<IpSocketAddress>
fn get_remote_address( &mut self, id: NamedId, socket: Resource<TcpSocket>, ) -> SocketResult<IpSocketAddress>
Get the remote address. Read more
Source§fn get_is_listening(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
) -> Result<bool>
fn get_is_listening( &mut self, id: NamedId, socket: Resource<TcpSocket>, ) -> Result<bool>
Whether the socket is in the
listening state. Read moreSource§fn get_address_family(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
) -> Result<IpAddressFamily>
fn get_address_family( &mut self, id: NamedId, socket: Resource<TcpSocket>, ) -> Result<IpAddressFamily>
Whether this is a IPv4 or IPv6 socket. Read more
Source§fn set_listen_backlog_size(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
value: u64,
) -> SocketResult<()>
fn set_listen_backlog_size( &mut self, id: NamedId, socket: Resource<TcpSocket>, value: u64, ) -> SocketResult<()>
Hints the desired listen queue size. Implementations are free to
ignore this. Read more
Source§fn get_keep_alive_enabled(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
) -> SocketResult<bool>
fn get_keep_alive_enabled( &mut self, id: NamedId, socket: Resource<TcpSocket>, ) -> SocketResult<bool>
Enables or disables keepalive. Read more
fn set_keep_alive_enabled( &mut self, id: NamedId, socket: Resource<TcpSocket>, value: bool, ) -> SocketResult<()>
Source§fn get_keep_alive_idle_time(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
) -> SocketResult<Duration>
fn get_keep_alive_idle_time( &mut self, id: NamedId, socket: Resource<TcpSocket>, ) -> SocketResult<Duration>
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, id: NamedId, socket: Resource<TcpSocket>, value: Duration, ) -> SocketResult<()>
Source§fn get_keep_alive_interval(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
) -> SocketResult<Duration>
fn get_keep_alive_interval( &mut self, id: NamedId, socket: Resource<TcpSocket>, ) -> SocketResult<Duration>
The time between keepalive packets. Read more
fn set_keep_alive_interval( &mut self, id: NamedId, socket: Resource<TcpSocket>, value: Duration, ) -> SocketResult<()>
Source§fn get_keep_alive_count(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
) -> SocketResult<u32>
fn get_keep_alive_count( &mut self, id: NamedId, socket: 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, id: NamedId, socket: Resource<TcpSocket>, value: u32, ) -> SocketResult<()>
Source§fn get_hop_limit(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
) -> SocketResult<u8>
fn get_hop_limit( &mut self, id: NamedId, socket: Resource<TcpSocket>, ) -> SocketResult<u8>
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. Read more
fn set_hop_limit( &mut self, id: NamedId, socket: Resource<TcpSocket>, value: u8, ) -> SocketResult<()>
Source§fn get_receive_buffer_size(
&mut self,
id: NamedId,
socket: Resource<TcpSocket>,
) -> SocketResult<u64>
fn get_receive_buffer_size( &mut self, id: NamedId, socket: Resource<TcpSocket>, ) -> SocketResult<u64>
Kernel buffer space reserved for sending/receiving on this socket.
Implementations usually treat this as a cap the buffer can grow to,
rather than allocating the full amount immediately. Read more
fn set_receive_buffer_size( &mut self, id: NamedId, socket: Resource<TcpSocket>, value: u64, ) -> SocketResult<()>
fn get_send_buffer_size( &mut self, id: NamedId, socket: Resource<TcpSocket>, ) -> SocketResult<u64>
fn set_send_buffer_size( &mut self, id: NamedId, socket: Resource<TcpSocket>, value: u64, ) -> SocketResult<()>
fn drop(&mut self, id: NamedId, sock: Resource<TcpSocket>) -> Result<()>
Source§impl<T> HostTerminalInput for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
impl<T> HostTerminalInput for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Source§impl<T> HostTerminalInput for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature p3 only.
impl<T> HostTerminalInput for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.Source§impl<T> HostTerminalOutput for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
impl<T> HostTerminalOutput for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Source§impl<T> HostTerminalOutput for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature p3 only.
impl<T> HostTerminalOutput for WasiCtxNamedView<'_, T>where
T: WasiCliNamedView,
Available on crate feature
p3 only.Source§impl<T> HostUdpSocket for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
impl<T> HostUdpSocket for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Source§async fn start_bind(
&mut self,
id: NamedId,
this: Resource<UdpSocket>,
network: Resource<Network>,
local_address: IpSocketAddress,
) -> SocketResult<()>
async fn start_bind( &mut self, id: NamedId, this: Resource<UdpSocket>, network: Resource<Network>, local_address: IpSocketAddress, ) -> SocketResult<()>
Bind the socket to a specific network on the provided IP address and port. Read more
fn finish_bind( &mut self, id: NamedId, this: Resource<UdpSocket>, ) -> SocketResult<()>
Source§async fn stream(
&mut self,
id: NamedId,
this: Resource<UdpSocket>,
remote_address: Option<IpSocketAddress>,
) -> SocketResult<(Resource<IncomingDatagramStream>, Resource<OutgoingDatagramStream>)>
async fn stream( &mut self, id: NamedId, this: Resource<UdpSocket>, remote_address: Option<IpSocketAddress>, ) -> SocketResult<(Resource<IncomingDatagramStream>, Resource<OutgoingDatagramStream>)>
Set up inbound & outbound communication channels, optionally to a specific peer. Read more
Source§fn local_address(
&mut self,
id: NamedId,
this: Resource<UdpSocket>,
) -> SocketResult<IpSocketAddress>
fn local_address( &mut self, id: NamedId, this: Resource<UdpSocket>, ) -> SocketResult<IpSocketAddress>
Get the current bound address. Read more
Source§fn remote_address(
&mut self,
id: NamedId,
this: Resource<UdpSocket>,
) -> SocketResult<IpSocketAddress>
fn remote_address( &mut self, id: NamedId, this: Resource<UdpSocket>, ) -> SocketResult<IpSocketAddress>
Get the address the socket is currently streaming to. Read more
Source§fn address_family(
&mut self,
id: NamedId,
this: Resource<UdpSocket>,
) -> Result<IpAddressFamily, Error>
fn address_family( &mut self, id: NamedId, this: Resource<UdpSocket>, ) -> Result<IpAddressFamily, Error>
Whether this is a IPv4 or IPv6 socket. Read more
Source§fn unicast_hop_limit(
&mut self,
id: NamedId,
this: Resource<UdpSocket>,
) -> SocketResult<u8>
fn unicast_hop_limit( &mut self, id: NamedId, this: Resource<UdpSocket>, ) -> SocketResult<u8>
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. Read more
fn set_unicast_hop_limit( &mut self, id: NamedId, this: Resource<UdpSocket>, value: u8, ) -> SocketResult<()>
Source§fn receive_buffer_size(
&mut self,
id: NamedId,
this: Resource<UdpSocket>,
) -> SocketResult<u64>
fn receive_buffer_size( &mut self, id: NamedId, 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, id: NamedId, this: Resource<UdpSocket>, value: u64, ) -> SocketResult<()>
fn send_buffer_size( &mut self, id: NamedId, this: Resource<UdpSocket>, ) -> SocketResult<u64>
fn set_send_buffer_size( &mut self, id: NamedId, this: Resource<UdpSocket>, value: u64, ) -> SocketResult<()>
Source§fn subscribe(
&mut self,
id: NamedId,
this: Resource<UdpSocket>,
) -> Result<Resource<DynPollable>>
fn subscribe( &mut self, id: NamedId, this: Resource<UdpSocket>, ) -> Result<Resource<DynPollable>>
Create a
pollable which will resolve once the socket is ready for I/O. Read morefn drop(&mut self, id: NamedId, this: Resource<UdpSocket>) -> Result<(), Error>
Source§impl<T> HostUdpSocket for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Available on crate feature p3 only.
impl<T> HostUdpSocket for WasiCtxNamedView<'_, T>where
T: WasiSocketsNamedView,
Available on crate feature
p3 only.Source§async fn bind(
&mut self,
id: NamedId,
socket: Resource<UdpSocket>,
local_address: IpSocketAddress,
) -> SocketResult<()>
async fn bind( &mut self, id: NamedId, socket: Resource<UdpSocket>, local_address: IpSocketAddress, ) -> SocketResult<()>
Bind the socket to the provided IP address and port. Read more
Source§async fn connect(
&mut self,
id: NamedId,
socket: Resource<UdpSocket>,
remote_address: IpSocketAddress,
) -> SocketResult<()>
async fn connect( &mut self, id: NamedId, socket: Resource<UdpSocket>, remote_address: IpSocketAddress, ) -> SocketResult<()>
Associate this socket with a specific peer address. Read more
Source§async fn create(
&mut self,
id: NamedId,
address_family: IpAddressFamily,
) -> SocketResult<Resource<UdpSocket>>
async fn create( &mut self, id: NamedId, address_family: IpAddressFamily, ) -> SocketResult<Resource<UdpSocket>>
Create a new UDP socket. Read more
Source§fn disconnect(
&mut self,
id: NamedId,
socket: Resource<UdpSocket>,
) -> SocketResult<()>
fn disconnect( &mut self, id: NamedId, socket: Resource<UdpSocket>, ) -> SocketResult<()>
Dissociate this socket from its peer address. Read more
Source§fn get_local_address(
&mut self,
id: NamedId,
socket: Resource<UdpSocket>,
) -> SocketResult<IpSocketAddress>
fn get_local_address( &mut self, id: NamedId, socket: Resource<UdpSocket>, ) -> SocketResult<IpSocketAddress>
Get the current bound address. Read more
Source§fn get_remote_address(
&mut self,
id: NamedId,
socket: Resource<UdpSocket>,
) -> SocketResult<IpSocketAddress>
fn get_remote_address( &mut self, id: NamedId, socket: Resource<UdpSocket>, ) -> SocketResult<IpSocketAddress>
Get the address the socket is currently “connected” to. Read more
Source§fn get_address_family(
&mut self,
id: NamedId,
socket: Resource<UdpSocket>,
) -> Result<IpAddressFamily>
fn get_address_family( &mut self, id: NamedId, socket: Resource<UdpSocket>, ) -> Result<IpAddressFamily>
Whether this is a IPv4 or IPv6 socket. Read more
Source§fn get_unicast_hop_limit(
&mut self,
id: NamedId,
socket: Resource<UdpSocket>,
) -> SocketResult<u8>
fn get_unicast_hop_limit( &mut self, id: NamedId, socket: Resource<UdpSocket>, ) -> SocketResult<u8>
Equivalent to the IP_TTL & IPV6_UNICAST_HOPS socket options. Read more
fn set_unicast_hop_limit( &mut self, id: NamedId, socket: Resource<UdpSocket>, value: u8, ) -> SocketResult<()>
Source§fn get_receive_buffer_size(
&mut self,
id: NamedId,
socket: Resource<UdpSocket>,
) -> SocketResult<u64>
fn get_receive_buffer_size( &mut self, id: NamedId, socket: Resource<UdpSocket>, ) -> SocketResult<u64>
Kernel buffer space reserved for sending/receiving on this socket.
Implementations usually treat this as a cap the buffer can grow to,
rather than allocating the full amount immediately. Read more
fn set_receive_buffer_size( &mut self, id: NamedId, socket: Resource<UdpSocket>, value: u64, ) -> SocketResult<()>
fn get_send_buffer_size( &mut self, id: NamedId, socket: Resource<UdpSocket>, ) -> SocketResult<u64>
fn set_send_buffer_size( &mut self, id: NamedId, socket: Resource<UdpSocket>, value: u64, ) -> SocketResult<()>
fn drop(&mut self, id: NamedId, sock: Resource<UdpSocket>) -> Result<()>
Auto Trait Implementations§
impl<'a, T> !UnwindSafe for WasiCtxNamedView<'a, T>
impl<'a, T> Freeze for WasiCtxNamedView<'a, T>
impl<'a, T> RefUnwindSafe for WasiCtxNamedView<'a, T>where
&'a mut T: RefUnwindSafe,
impl<'a, T> Send for WasiCtxNamedView<'a, T>
impl<'a, T> Sync for WasiCtxNamedView<'a, T>
impl<'a, T> Unpin for WasiCtxNamedView<'a, T>
impl<'a, T> UnsafeUnpin for WasiCtxNamedView<'a, T>where
&'a mut T: UnsafeUnpin,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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