pub struct FactorsInstanceBuilder<'a, F: RuntimeFactors, U> { /* private fields */ }
Expand description
A FactorsInstanceBuilder manages the instantiation of a Spin component instance.
It is generic over the executor’s [RuntimeFactors
] and any ad-hoc additional
per-instance state needed by the caller.
Implementations§
Source§impl<'a, T: RuntimeFactors, U> FactorsInstanceBuilder<'a, T, U>
impl<'a, T: RuntimeFactors, U> FactorsInstanceBuilder<'a, T, U>
Sourcepub fn app_component(&self) -> &AppComponent<'_>
pub fn app_component(&self) -> &AppComponent<'_>
Returns the app component for the instance.
Sourcepub fn store_builder(&mut self) -> &mut StoreBuilder
pub fn store_builder(&mut self) -> &mut StoreBuilder
Returns the store builder for the instance.
Sourcepub fn factor_builders(&mut self) -> &mut T::InstanceBuilders
pub fn factor_builders(&mut self) -> &mut T::InstanceBuilders
Returns the factor instance builders for the instance.
Sourcepub fn factor_builder<F: Factor>(&mut self) -> Option<&mut F::InstanceBuilder>
pub fn factor_builder<F: Factor>(&mut self) -> Option<&mut F::InstanceBuilder>
Returns the specific instance builder for the given factor.
Sourcepub fn wasmtime_engine(&self) -> &WasmtimeEngine
pub fn wasmtime_engine(&self) -> &WasmtimeEngine
Returns the underlying wasmtime engine for the instance.
Source§impl<'a, T: RuntimeFactors, U: Send> FactorsInstanceBuilder<'a, T, U>
impl<'a, T: RuntimeFactors, U: Send> FactorsInstanceBuilder<'a, T, U>
Sourcepub async fn instantiate(
self,
executor_instance_state: U,
) -> Result<(Instance, Store<InstanceState<T::InstanceState, U>>)>
pub async fn instantiate( self, executor_instance_state: U, ) -> Result<(Instance, Store<InstanceState<T::InstanceState, U>>)>
Instantiates the instance with the given executor instance state
Auto Trait Implementations§
impl<'a, F, U> Freeze for FactorsInstanceBuilder<'a, F, U>where
<F as RuntimeFactors>::InstanceBuilders: Freeze,
impl<'a, F, U> !RefUnwindSafe for FactorsInstanceBuilder<'a, F, U>
impl<'a, F, U> Send for FactorsInstanceBuilder<'a, F, U>
impl<'a, F, U> Sync for FactorsInstanceBuilder<'a, F, U>where
<F as RuntimeFactors>::InstanceBuilders: Sync,
impl<'a, F, U> Unpin for FactorsInstanceBuilder<'a, F, U>where
<F as RuntimeFactors>::InstanceBuilders: Unpin,
impl<'a, F, U> !UnwindSafe for FactorsInstanceBuilder<'a, F, U>
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> 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