pub struct Noop<Cur: Sandbox, Next: Sandbox> { /* private fields */ }
Expand description
Transition metadata that contains and does nothing. Noop
is a
placeholder when you want to implement an EvolvableSandbox
or DevolvableSandbox
that needs no additional metadata to succeed.
Construct one of these by using the default()
method.
Trait Implementations§
Source§impl DevolvableSandbox<MultiUseSandbox, MultiUseSandbox, Noop<MultiUseSandbox, MultiUseSandbox>> for MultiUseSandbox
impl DevolvableSandbox<MultiUseSandbox, MultiUseSandbox, Noop<MultiUseSandbox, MultiUseSandbox>> for MultiUseSandbox
Source§fn devolve(
self,
_tsn: Noop<MultiUseSandbox, MultiUseSandbox>,
) -> Result<MultiUseSandbox>
fn devolve( self, _tsn: Noop<MultiUseSandbox, MultiUseSandbox>, ) -> Result<MultiUseSandbox>
Consume self
and move it back to a MultiUseSandbox
with previous state.
The purpose of this function is to allow multiple states to be associated with a single MultiUseSandbox.
An implementation such as HyperlightJs or HyperlightWasm can use this to call guest functions to load JS or WASM code and then evolve the sandbox causing state to be captured. The new MultiUseSandbox can then be used to call guest functions to execute the loaded code. The devolve can be used to return the MultiUseSandbox to the state before the code was loaded. Thus avoiding initialisation overhead
Source§impl EvolvableSandbox<UninitializedSandbox, MultiUseSandbox, Noop<UninitializedSandbox, MultiUseSandbox>> for UninitializedSandbox
impl EvolvableSandbox<UninitializedSandbox, MultiUseSandbox, Noop<UninitializedSandbox, MultiUseSandbox>> for UninitializedSandbox
Source§fn evolve(
self,
_: Noop<UninitializedSandbox, MultiUseSandbox>,
) -> Result<MultiUseSandbox>
fn evolve( self, _: Noop<UninitializedSandbox, MultiUseSandbox>, ) -> Result<MultiUseSandbox>
Evolve self
to a MultiUseSandbox
without any additional metadata.