Struct wasmer_wasix::journal::effector::JournalEffector
source · pub struct JournalEffector {}
Expand description
The journal effector is an adapter that will be removed in a future refactor. Its purpose is to put the code that does mappings from WASM memory through its abstractions into concrete journal objects that can be stored. Instead of this what should be done is that the syscalls themselves can be represented as a strongly typed object that can be passed directly to the journal but in order to do this we require an extensive refactoring of the WASIX syscalls which is not in scope at this time.
Separating this out now makes it easier to eliminate later without hurting the journal event abstraction through leaking abstraction layers.
Implementations§
source§impl JournalEffector
impl JournalEffector
pub fn save_chdir( ctx: &mut FunctionEnvMut<'_, WasiEnv>, path: String, ) -> Result<()>
pub fn apply_chdir( ctx: &mut FunctionEnvMut<'_, WasiEnv>, path: &str, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_clock_time_set( ctx: &mut FunctionEnvMut<'_, WasiEnv>, clock_id: Snapshot0Clockid, time: Timestamp, ) -> Result<()>
pub fn apply_clock_time_set( ctx: &mut FunctionEnvMut<'_, WasiEnv>, clock_id: Snapshot0Clockid, time: Timestamp, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_epoll_create( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, ) -> Result<()>
pub fn apply_epoll_create( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_epoll_ctl( ctx: &mut FunctionEnvMut<'_, WasiEnv>, epfd: Fd, op: EpollCtl, fd: Fd, event: Option<EpollEventCtl>, ) -> Result<()>
pub fn apply_epoll_ctl( ctx: &mut FunctionEnvMut<'_, WasiEnv>, pfd: Fd, op: EpollCtl, fd: Fd, event: Option<EpollEventCtl>, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_advise( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, offset: Filesize, len: Filesize, advice: Advice, ) -> Result<()>
pub fn apply_fd_advise( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, offset: Filesize, len: Filesize, advice: Advice, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_allocate( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, offset: Filesize, len: Filesize, ) -> Result<()>
pub fn apply_fd_allocate( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, offset: Filesize, len: Filesize, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_close( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, ) -> Result<()>
pub fn apply_fd_close( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_duplicate( ctx: &mut FunctionEnvMut<'_, WasiEnv>, original_fd: Fd, copied_fd: Fd, ) -> Result<()>
pub fn apply_fd_duplicate( ctx: &mut FunctionEnvMut<'_, WasiEnv>, original_fd: Fd, copied_fd: Fd, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_event( ctx: &mut FunctionEnvMut<'_, WasiEnv>, initial_val: u64, flags: EventFdFlags, fd: Fd, ) -> Result<()>
pub fn apply_fd_event( ctx: &mut FunctionEnvMut<'_, WasiEnv>, initial_val: u64, flags: EventFdFlags, fd: Fd, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_pipe( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd1: Fd, fd2: Fd, ) -> Result<()>
pub fn apply_fd_pipe( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd1: Fd, fd2: Fd, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_renumber( ctx: &mut FunctionEnvMut<'_, WasiEnv>, from: Fd, to: Fd, ) -> Result<()>
pub fn apply_fd_renumber( ctx: &mut FunctionEnvMut<'_, WasiEnv>, from: Fd, to: Fd, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_seek( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, offset: i64, whence: Whence, ) -> Result<()>
pub fn apply_fd_seek( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, offset: i64, whence: Whence, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_set_flags( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, flags: Fdflags, ) -> Result<()>
pub fn apply_fd_set_flags( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, flags: Fdflags, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_set_rights( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, fs_rights_base: Rights, fs_rights_inheriting: Rights, ) -> Result<()>
pub fn apply_fd_set_rights( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, fs_rights_base: Rights, fs_rights_inheriting: Rights, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_set_size( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, st_size: Filesize, ) -> Result<()>
pub fn apply_fd_set_size( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, st_size: Filesize, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_set_times( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, st_atim: Timestamp, st_mtim: Timestamp, fst_flags: Fstflags, ) -> Result<()>
pub fn apply_fd_set_times( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, st_atim: Timestamp, st_mtim: Timestamp, fst_flags: Fstflags, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_fd_write<M: MemorySize>( ctx: &FunctionEnvMut<'_, WasiEnv>, fd: Fd, offset: u64, written: usize, iovs: WasmPtr<__wasi_ciovec_t<M>, M>, iovs_len: M::Offset, ) -> Result<()>
pub fn apply_fd_write<M: MemorySize>( ctx: &FunctionEnvMut<'_, WasiEnv>, fd: Fd, offset: u64, data: Cow<'_, [u8]>, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_path_create_directory( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, path: String, ) -> Result<()>
pub fn apply_path_create_directory( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, path: &str, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_path_link( ctx: &mut FunctionEnvMut<'_, WasiEnv>, old_fd: Fd, old_flags: LookupFlags, old_path: String, new_fd: Fd, new_path: String, ) -> Result<()>
pub fn apply_path_link( ctx: &mut FunctionEnvMut<'_, WasiEnv>, old_fd: Fd, old_flags: LookupFlags, old_path: &str, new_fd: Fd, new_path: &str, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_path_open( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, dirfd: Fd, dirflags: LookupFlags, path: String, o_flags: Oflags, fs_rights_base: Rights, fs_rights_inheriting: Rights, fs_flags: Fdflags, ) -> Result<()>
pub fn apply_path_open( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, dirfd: Fd, dirflags: LookupFlags, path: &str, o_flags: Oflags, fs_rights_base: Rights, fs_rights_inheriting: Rights, fs_flags: Fdflags, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_path_remove_directory( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, path: String, ) -> Result<()>
pub fn apply_path_remove_directory( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, path: &str, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_path_rename( ctx: &mut FunctionEnvMut<'_, WasiEnv>, old_fd: Fd, old_path: String, new_fd: Fd, new_path: String, ) -> Result<()>
pub fn apply_path_rename( ctx: &mut FunctionEnvMut<'_, WasiEnv>, old_fd: Fd, old_path: &str, new_fd: Fd, new_path: &str, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_path_set_times( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, flags: LookupFlags, path: String, st_atim: Timestamp, st_mtim: Timestamp, fst_flags: Fstflags, ) -> Result<()>
pub fn apply_path_set_times( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, flags: LookupFlags, path: &str, st_atim: Timestamp, st_mtim: Timestamp, fst_flags: Fstflags, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_path_symlink( ctx: &mut FunctionEnvMut<'_, WasiEnv>, old_path: String, fd: Fd, new_path: String, ) -> Result<()>
pub fn apply_path_symlink( ctx: &mut FunctionEnvMut<'_, WasiEnv>, old_path: &str, fd: Fd, new_path: &str, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_path_unlink( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, path: String, ) -> Result<()>
pub fn apply_path_unlink( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, path: &str, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_port_addr_add( ctx: &mut FunctionEnvMut<'_, WasiEnv>, cidr: IpCidr, ) -> Result<()>
pub fn apply_port_addr_add( ctx: &mut FunctionEnvMut<'_, WasiEnv>, cidr: IpCidr, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_port_addr_clear(ctx: &mut FunctionEnvMut<'_, WasiEnv>) -> Result<()>
pub fn apply_port_addr_clear( ctx: &mut FunctionEnvMut<'_, WasiEnv>, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_port_addr_remove( ctx: &mut FunctionEnvMut<'_, WasiEnv>, addr: IpAddr, ) -> Result<()>
pub fn apply_port_addr_remove( ctx: &mut FunctionEnvMut<'_, WasiEnv>, addr: IpAddr, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_port_bridge( ctx: &mut FunctionEnvMut<'_, WasiEnv>, network: String, token: String, security: StreamSecurity, ) -> Result<()>
pub fn apply_port_bridge( ctx: &mut FunctionEnvMut<'_, WasiEnv>, network: &str, token: &str, security: StreamSecurity, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_port_dhcp_acquire( ctx: &mut FunctionEnvMut<'_, WasiEnv>, ) -> Result<()>
pub fn apply_port_dhcp_acquire( ctx: &mut FunctionEnvMut<'_, WasiEnv>, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_port_gateway_set( ctx: &mut FunctionEnvMut<'_, WasiEnv>, ip: IpAddr, ) -> Result<()>
pub fn apply_port_gateway_set( ctx: &mut FunctionEnvMut<'_, WasiEnv>, ip: IpAddr, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_port_route_add( ctx: &mut FunctionEnvMut<'_, WasiEnv>, cidr: IpCidr, via_router: IpAddr, preferred_until: Option<Duration>, expires_at: Option<Duration>, ) -> Result<()>
pub fn apply_port_route_add( ctx: &mut FunctionEnvMut<'_, WasiEnv>, cidr: IpCidr, via_router: IpAddr, preferred_until: Option<Duration>, expires_at: Option<Duration>, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_port_route_clear( ctx: &mut FunctionEnvMut<'_, WasiEnv>, ) -> Result<()>
pub fn apply_port_route_clear( ctx: &mut FunctionEnvMut<'_, WasiEnv>, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_port_route_remove( ctx: &mut FunctionEnvMut<'_, WasiEnv>, ip: IpAddr, ) -> Result<()>
pub fn apply_port_route_remove( ctx: &mut FunctionEnvMut<'_, WasiEnv>, ip: IpAddr, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_port_unbridge(ctx: &mut FunctionEnvMut<'_, WasiEnv>) -> Result<()>
pub fn apply_port_unbridge(ctx: &mut FunctionEnvMut<'_, WasiEnv>) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_accepted( ctx: &mut FunctionEnvMut<'_, WasiEnv>, listen_fd: Fd, fd: Fd, addr: SocketAddr, peer_addr: SocketAddr, fd_flags: Fdflags, nonblocking: bool, ) -> Result<()>
pub fn apply_sock_accepted( ctx: &mut FunctionEnvMut<'_, WasiEnv>, _listen_fd: Fd, fd: Fd, addr: SocketAddr, peer_addr: SocketAddr, fd_flags: Fdflags, nonblocking: bool, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_bind( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, addr: SocketAddr, ) -> Result<()>
pub fn apply_sock_bind( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, addr: SocketAddr, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_connect( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, local_addr: SocketAddr, peer_addr: SocketAddr, ) -> Result<()>
pub fn apply_sock_connect( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, local_addr: SocketAddr, peer_addr: SocketAddr, dead: bool, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_join_ipv4_multicast( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, multiaddr: Ipv4Addr, iface: Ipv4Addr, ) -> Result<()>
pub fn apply_sock_join_ipv4_multicast( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, multiaddr: Ipv4Addr, iface: Ipv4Addr, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_join_ipv6_multicast( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, multiaddr: Ipv6Addr, iface: u32, ) -> Result<()>
pub fn apply_sock_join_ipv6_multicast( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, multiaddr: Ipv6Addr, iface: u32, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_leave_ipv4_multicast( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, multiaddr: Ipv4Addr, iface: Ipv4Addr, ) -> Result<()>
pub fn apply_sock_leave_ipv4_multicast( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, multiaddr: Ipv4Addr, iface: Ipv4Addr, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_leave_ipv6_multicast( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, multiaddr: Ipv6Addr, iface: u32, ) -> Result<()>
pub fn apply_sock_leave_ipv6_multicast( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, multiaddr: Ipv6Addr, iface: u32, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_listen( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, backlog: usize, ) -> Result<()>
pub fn apply_sock_listen( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, backlog: usize, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_open( ctx: &mut FunctionEnvMut<'_, WasiEnv>, af: Addressfamily, ty: Socktype, pt: SockProto, fd: Fd, ) -> Result<()>
pub fn apply_sock_open( ctx: &mut FunctionEnvMut<'_, WasiEnv>, af: Addressfamily, ty: Socktype, pt: SockProto, fd: Fd, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_send<M: MemorySize>( ctx: &FunctionEnvMut<'_, WasiEnv>, fd: Fd, sent: usize, iovs: WasmPtr<__wasi_ciovec_t<M>, M>, iovs_len: M::Offset, si_flags: SiFlags, ) -> Result<()>
pub fn apply_sock_send<M: MemorySize>( ctx: &FunctionEnvMut<'_, WasiEnv>, sock: Fd, si_data: Cow<'_, [u8]>, si_flags: SiFlags, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_send_file<M: MemorySize>( ctx: &mut FunctionEnvMut<'_, WasiEnv>, socket_fd: Fd, file_fd: Fd, offset: Filesize, count: Filesize, ) -> Result<()>
pub fn apply_sock_send_file( ctx: &mut FunctionEnvMut<'_, WasiEnv>, socket_fd: Fd, file_fd: Fd, offset: Filesize, count: Filesize, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_send_to<M: MemorySize>( ctx: &FunctionEnvMut<'_, WasiEnv>, fd: Fd, sent: usize, iovs: WasmPtr<__wasi_ciovec_t<M>, M>, iovs_len: M::Offset, addr: SocketAddr, si_flags: SiFlags, ) -> Result<()>
pub fn apply_sock_send_to<M: MemorySize>( ctx: &FunctionEnvMut<'_, WasiEnv>, sock: Fd, si_data: Cow<'_, [u8]>, si_flags: SiFlags, addr: SocketAddr, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_set_opt_flag( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, opt: Sockoption, flag: bool, ) -> Result<()>
pub fn apply_sock_set_opt_flag( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, opt: Sockoption, flag: bool, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_set_opt_size( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, opt: Sockoption, size: Filesize, ) -> Result<()>
pub fn apply_sock_set_opt_size( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, opt: Sockoption, size: Filesize, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_set_opt_time( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, ty: TimeType, time: Option<Duration>, ) -> Result<()>
pub fn apply_sock_set_opt_time( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, ty: TimeType, time: Option<Duration>, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_sock_shutdown( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, shutdown: Shutdown, ) -> Result<()>
pub fn apply_sock_shutdown( ctx: &mut FunctionEnvMut<'_, WasiEnv>, fd: Fd, shutdown: Shutdown, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_tty_set( ctx: &mut FunctionEnvMut<'_, WasiEnv>, state: WasiTtyState, ) -> Result<()>
pub fn apply_tty_set( ctx: &mut FunctionEnvMut<'_, WasiEnv>, state: WasiTtyState, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_memory_and_snapshot( ctx: &mut FunctionEnvMut<'_, WasiEnv>, guard: &mut MutexGuard<'_, WasiProcessInner>, trigger: SnapshotTrigger, ) -> Result<()>
sourcepub unsafe fn apply_compressed_memory(
ctx: &mut FunctionEnvMut<'_, WasiEnv>,
region: Range<u64>,
compressed_data: &[u8],
) -> Result<()>
pub unsafe fn apply_compressed_memory( ctx: &mut FunctionEnvMut<'_, WasiEnv>, region: Range<u64>, compressed_data: &[u8], ) -> Result<()>
§Safety
This function manipulates the memory of the process and thus must be executed by the WASM process thread itself.
source§impl JournalEffector
impl JournalEffector
pub fn save_process_exit( env: &WasiEnv, exit_code: Option<ExitCode>, ) -> Result<()>
sourcepub unsafe fn apply_process_exit(
ctx: &mut FunctionEnvMut<'_, WasiEnv>,
exit_code: Option<ExitCode>,
) -> Result<()>
pub unsafe fn apply_process_exit( ctx: &mut FunctionEnvMut<'_, WasiEnv>, exit_code: Option<ExitCode>, ) -> Result<()>
§Safety
This function manipulates the memory of the process and thus must be executed by the WASM process thread itself.
source§impl JournalEffector
impl JournalEffector
pub(crate) fn save_event( ctx: &mut FunctionEnvMut<'_, WasiEnv>, event: JournalEntry<'_>, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_thread_exit( env: &WasiEnv, id: WasiThreadId, exit_code: Option<ExitCode>, ) -> Result<()>
pub fn apply_thread_exit( ctx: &mut FunctionEnvMut<'_, WasiEnv>, tid: WasiThreadId, exit_code: Option<ExitCode>, ) -> Result<()>
source§impl JournalEffector
impl JournalEffector
pub fn save_thread_state<M: MemorySize>( ctx: &mut FunctionEnvMut<'_, WasiEnv>, id: WasiThreadId, memory_stack: Bytes, rewind_stack: Bytes, store_data: Bytes, start: ThreadStartType, layout: WasiMemoryLayout, ) -> Result<()>
sourcepub fn apply_thread_state<M: MemorySize>(
ctx: &mut FunctionEnvMut<'_, WasiEnv>,
tid: WasiThreadId,
memory_stack: Bytes,
rewind_stack: Bytes,
store_data: Bytes,
start: ThreadStartType,
layout: WasiMemoryLayout,
) -> Result<()>
pub fn apply_thread_state<M: MemorySize>( ctx: &mut FunctionEnvMut<'_, WasiEnv>, tid: WasiThreadId, memory_stack: Bytes, rewind_stack: Bytes, store_data: Bytes, start: ThreadStartType, layout: WasiMemoryLayout, ) -> Result<()>
This will take the supplied stacks and apply them to the memory region dedicated to this thread. After that it will spawn a WASM thread and
Trait Implementations§
source§impl Clone for JournalEffector
impl Clone for JournalEffector
source§fn clone(&self) -> JournalEffector
fn clone(&self) -> JournalEffector
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for JournalEffector
impl RefUnwindSafe for JournalEffector
impl Send for JournalEffector
impl Sync for JournalEffector
impl Unpin for JournalEffector
impl UnwindSafe for JournalEffector
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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> ⓘ
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> ⓘ
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