pub struct DefaultProcessState { /* private fields */ }
Implementations§
Source§impl DefaultProcessState
impl DefaultProcessState
pub fn new( environment: Arc<LunaticEnvironment>, distributed: Option<DistributedProcessState>, runtime: WasmtimeRuntime, module: Arc<WasmtimeCompiledModule<Self>>, config: Arc<DefaultProcessConfig>, registry: Arc<RwLock<HashMap<String, (u64, u64)>>>, ) -> Result<Self>
Trait Implementations§
Source§impl Debug for DefaultProcessState
impl Debug for DefaultProcessState
Source§impl DistributedCtx<LunaticEnvironment> for DefaultProcessState
impl DistributedCtx<LunaticEnvironment> for DefaultProcessState
fn distributed_mut(&mut self) -> Result<&mut DistributedProcessState>
fn distributed(&self) -> Result<&DistributedProcessState>
fn module_id(&self) -> u64
fn environment_id(&self) -> u64
fn can_spawn(&self) -> bool
fn new_dist_state( environment: Arc<LunaticEnvironment>, distributed: DistributedProcessState, runtime: WasmtimeRuntime, module: Arc<WasmtimeCompiledModule<Self>>, config: Arc<Self::Config>, ) -> Result<Self>
Source§impl ErrorCtx for DefaultProcessState
impl ErrorCtx for DefaultProcessState
fn error_resources(&self) -> &ErrorResource
fn error_resources_mut(&mut self) -> &mut ErrorResource
Source§impl LunaticWasiCtx for DefaultProcessState
impl LunaticWasiCtx for DefaultProcessState
fn wasi(&self) -> &WasiCtx
fn wasi_mut(&mut self) -> &mut WasiCtx
fn set_stdout(&mut self, stdout: StdoutCapture)
fn set_stderr(&mut self, stderr: StdoutCapture)
fn get_stdout(&self) -> Option<&StdoutCapture>
fn get_stderr(&self) -> Option<&StdoutCapture>
Source§impl NetworkingCtx for DefaultProcessState
impl NetworkingCtx for DefaultProcessState
fn tcp_listener_resources(&self) -> &TcpListenerResources
fn tcp_listener_resources_mut(&mut self) -> &mut TcpListenerResources
fn tcp_stream_resources(&self) -> &TcpStreamResources
fn tcp_stream_resources_mut(&mut self) -> &mut TcpStreamResources
fn tls_listener_resources(&self) -> &TlsListenerResources
fn tls_listener_resources_mut(&mut self) -> &mut TlsListenerResources
fn tls_stream_resources(&self) -> &TlsStreamResources
fn tls_stream_resources_mut(&mut self) -> &mut TlsStreamResources
fn udp_resources(&self) -> &UdpResources
fn udp_resources_mut(&mut self) -> &mut UdpResources
fn dns_resources(&self) -> &DnsResources
fn dns_resources_mut(&mut self) -> &mut DnsResources
Source§impl ProcessCtx<DefaultProcessState> for DefaultProcessState
impl ProcessCtx<DefaultProcessState> for DefaultProcessState
fn mailbox(&mut self) -> &mut MessageMailbox
fn message_scratch_area(&mut self) -> &mut Option<Message>
fn module_resources(&self) -> &ModuleResources<DefaultProcessState>
fn module_resources_mut(&mut self) -> &mut ModuleResources<DefaultProcessState>
fn environment(&self) -> Arc<dyn Environment>
Source§impl ProcessState for DefaultProcessState
impl ProcessState for DefaultProcessState
type Config = DefaultProcessConfig
fn new_state( &self, module: Arc<WasmtimeCompiledModule<Self>>, config: Arc<DefaultProcessConfig>, ) -> Result<Self>
Source§fn register(linker: &mut Linker<Self>) -> Result<()>
fn register(linker: &mut Linker<Self>) -> Result<()>
Register all host functions to the linker.
Source§fn initialize(&mut self)
fn initialize(&mut self)
Marks a wasm instance as initialized
Source§fn is_initialized(&self) -> bool
fn is_initialized(&self) -> bool
Returns true if the instance was initialized
Source§fn runtime(&self) -> &WasmtimeRuntime
fn runtime(&self) -> &WasmtimeRuntime
Returns the WebAssembly runtime
Source§fn config(&self) -> &Arc<DefaultProcessConfig>
fn config(&self) -> &Arc<DefaultProcessConfig>
Returns the process configuration
fn module(&self) -> &Arc<WasmtimeCompiledModule<Self>>
fn id(&self) -> u64
fn signal_mailbox(&self) -> &(SignalSender, SignalReceiver)
fn message_mailbox(&self) -> &MessageMailbox
fn config_resources( &self, ) -> &ConfigResources<<DefaultProcessState as ProcessState>::Config>
fn config_resources_mut( &mut self, ) -> &mut ConfigResources<<DefaultProcessState as ProcessState>::Config>
fn registry(&self) -> &Arc<RwLock<HashMap<String, (u64, u64)>>>
Source§impl ResourceLimiter for DefaultProcessState
impl ResourceLimiter for DefaultProcessState
Source§fn memory_growing(
&mut self,
_current: usize,
desired: usize,
_maximum: Option<usize>,
) -> bool
fn memory_growing( &mut self, _current: usize, desired: usize, _maximum: Option<usize>, ) -> bool
Notifies the resource limiter that an instance’s linear memory has been
requested to grow. Read more
Source§fn table_growing(
&mut self,
_current: u32,
desired: u32,
_maximum: Option<u32>,
) -> bool
fn table_growing( &mut self, _current: u32, desired: u32, _maximum: Option<u32>, ) -> bool
Notifies the resource limiter that an instance’s table has been
requested to grow. Read more
Source§fn instances(&self) -> usize
fn instances(&self) -> usize
The maximum number of instances that can be created for a
Store
. Read moreSource§fn tables(&self) -> usize
fn tables(&self) -> usize
The maximum number of tables that can be created for a
Store
. Read moreSource§fn memories(&self) -> usize
fn memories(&self) -> usize
The maximum number of linear memories that can be created for a
Store
Read moreSource§fn memory_grow_failed(&mut self, _error: &Error)
fn memory_grow_failed(&mut self, _error: &Error)
Notifies the resource limiter that growing a linear memory, permitted by
the
memory_growing
method, has failed. Read moreSource§fn table_grow_failed(&mut self, _error: &Error)
fn table_grow_failed(&mut self, _error: &Error)
Notifies the resource limiter that growing a linear memory, permitted by
the
table_growing
method, has failed. Read moreSource§impl SQLiteCtx for DefaultProcessState
impl SQLiteCtx for DefaultProcessState
fn sqlite_connections(&self) -> &SQLiteConnections
fn sqlite_connections_mut(&mut self) -> &mut SQLiteConnections
fn sqlite_statements_mut(&mut self) -> &mut SQLiteStatements
fn sqlite_statements(&self) -> &SQLiteStatements
fn sqlite_guest_allocator(&self) -> &SQLiteGuestAllocators
fn sqlite_guest_allocator_mut(&mut self) -> &mut SQLiteGuestAllocators
Source§impl TimerCtx for DefaultProcessState
impl TimerCtx for DefaultProcessState
fn timer_resources(&self) -> &TimerResources
fn timer_resources_mut(&mut self) -> &mut TimerResources
Auto Trait Implementations§
impl Freeze for DefaultProcessState
impl !RefUnwindSafe for DefaultProcessState
impl Send for DefaultProcessState
impl Sync for DefaultProcessState
impl Unpin for DefaultProcessState
impl !UnwindSafe for DefaultProcessState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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