pub struct NativeExecutorBuilder { /* private fields */ }
Expand description
Builder for NativeExecutor
Implementations§
Source§impl NativeExecutorBuilder
impl NativeExecutorBuilder
Sourcepub fn with_contract<C>(self) -> Selfwhere
C: Contract,
pub fn with_contract<C>(self) -> Selfwhere
C: Contract,
Make the native execution environment aware of the contract specified in generic argument.’
Here C
is the contract type:
ⓘ
builder.with_contract::<Flipper>()
NOTE: System contracts are already included by default.
Sourcepub fn with_contract_trait<C, DynCT>(self) -> Self
pub fn with_contract_trait<C, DynCT>(self) -> Self
Make the native execution environment aware of the trait implemented by the contract specified in generic argument.
Here C
is the contract type and DynCT
is a trait it implements in the form of
dyn ContractTrait
:
ⓘ
builder
.with_contract::<Token>()
.with_contract_trait::<Token, dyn Fungible>()
Sourcepub fn build(self) -> Result<NativeExecutor, NativeExecutorError>
pub fn build(self) -> Result<NativeExecutor, NativeExecutorError>
Build native execution configuration
Trait Implementations§
Source§impl Clone for NativeExecutorBuilder
impl Clone for NativeExecutorBuilder
Source§fn clone(&self) -> NativeExecutorBuilder
fn clone(&self) -> NativeExecutorBuilder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for NativeExecutorBuilder
impl RefUnwindSafe for NativeExecutorBuilder
impl Send for NativeExecutorBuilder
impl Sync for NativeExecutorBuilder
impl Unpin for NativeExecutorBuilder
impl UnwindSafe for NativeExecutorBuilder
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