pub struct ExecuteRequestBuilder { /* private fields */ }
Expand description
Builder for ExecuteRequest
.
Implementations§
Source§impl ExecuteRequestBuilder
impl ExecuteRequestBuilder
Sourcepub fn with_initiator(self, initiator: AccountHash) -> Self
pub fn with_initiator(self, initiator: AccountHash) -> Self
Set the initiator’s address.
Sourcepub fn with_caller_key(self, caller_key: Key) -> Self
pub fn with_caller_key(self, caller_key: Key) -> Self
Set the caller’s key.
Sourcepub fn with_gas_limit(self, gas_limit: u64) -> Self
pub fn with_gas_limit(self, gas_limit: u64) -> Self
Set the gas limit.
Sourcepub fn with_target(self, target: ExecutionKind) -> Self
pub fn with_target(self, target: ExecutionKind) -> Self
Set the target for execution.
Sourcepub fn with_input(self, input: Bytes) -> Self
pub fn with_input(self, input: Bytes) -> Self
Pass input data.
Sourcepub fn with_serialized_input<T: BorshSerialize>(self, input: T) -> Self
pub fn with_serialized_input<T: BorshSerialize>(self, input: T) -> Self
Pass input data that can be serialized.
Sourcepub fn with_transferred_value(self, value: u64) -> Self
pub fn with_transferred_value(self, value: u64) -> Self
Pass value to be sent to the contract.
Sourcepub fn with_transaction_hash(self, transaction_hash: TransactionHash) -> Self
pub fn with_transaction_hash(self, transaction_hash: TransactionHash) -> Self
Set the transaction hash.
Sourcepub fn with_address_generator(self, address_generator: AddressGenerator) -> Self
pub fn with_address_generator(self, address_generator: AddressGenerator) -> Self
Set the address generator.
This can be either seeded and created as part of the builder or shared across chain of execution requests.
Set the shared address generator.
This is useful when the address generator is shared across a chain of multiple execution requests.
Sourcepub fn with_chain_name<T: Into<Arc<str>>>(self, chain_name: T) -> Self
pub fn with_chain_name<T: Into<Arc<str>>>(self, chain_name: T) -> Self
Set the chain name.
Sourcepub fn with_block_time(self, block_time: BlockTime) -> Self
pub fn with_block_time(self, block_time: BlockTime) -> Self
Set the block time.
Sourcepub fn with_state_hash(self, state_hash: Digest) -> Self
pub fn with_state_hash(self, state_hash: Digest) -> Self
Set the state hash.
Sourcepub fn with_parent_block_hash(self, parent_block_hash: BlockHash) -> Self
pub fn with_parent_block_hash(self, parent_block_hash: BlockHash) -> Self
Set the parent block hash.
Sourcepub fn with_block_height(self, block_height: u64) -> Self
pub fn with_block_height(self, block_height: u64) -> Self
Set the block height.
Sourcepub fn build(self) -> Result<ExecuteRequest, &'static str>
pub fn build(self) -> Result<ExecuteRequest, &'static str>
Build the ExecuteRequest
.
Trait Implementations§
Source§impl Default for ExecuteRequestBuilder
impl Default for ExecuteRequestBuilder
Source§fn default() -> ExecuteRequestBuilder
fn default() -> ExecuteRequestBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ExecuteRequestBuilder
impl !RefUnwindSafe for ExecuteRequestBuilder
impl Send for ExecuteRequestBuilder
impl Sync for ExecuteRequestBuilder
impl Unpin for ExecuteRequestBuilder
impl !UnwindSafe for ExecuteRequestBuilder
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