pub enum ExecutionRequest {
Show 35 variants
LoadContract {
id: ApplicationId,
callback: Sender<(UserContractCode, ApplicationDescription)>,
},
LoadService {
id: ApplicationId,
callback: Sender<(UserServiceCode, ApplicationDescription)>,
},
ChainBalance {
callback: Sender<Amount>,
},
OwnerBalance {
owner: AccountOwner,
callback: Sender<Amount>,
},
OwnerBalances {
callback: Sender<Vec<(AccountOwner, Amount)>>,
},
BalanceOwners {
callback: Sender<Vec<AccountOwner>>,
},
Transfer {
source: AccountOwner,
destination: Account,
amount: Amount,
signer: Option<AccountOwner>,
application_id: ApplicationId,
callback: Sender<()>,
},
Claim {
source: Account,
destination: Account,
amount: Amount,
signer: Option<AccountOwner>,
application_id: ApplicationId,
callback: Sender<()>,
},
SystemTimestamp {
callback: Sender<Timestamp>,
},
ChainOwnership {
callback: Sender<ChainOwnership>,
},
ReadValueBytes {
id: ApplicationId,
key: Vec<u8>,
callback: Sender<Option<Vec<u8>>>,
},
ContainsKey {
id: ApplicationId,
key: Vec<u8>,
callback: Sender<bool>,
},
ContainsKeys {
id: ApplicationId,
keys: Vec<Vec<u8>>,
callback: Sender<Vec<bool>>,
},
ReadMultiValuesBytes {
id: ApplicationId,
keys: Vec<Vec<u8>>,
callback: Sender<Vec<Option<Vec<u8>>>>,
},
FindKeysByPrefix {
id: ApplicationId,
key_prefix: Vec<u8>,
callback: Sender<Vec<Vec<u8>>>,
},
FindKeyValuesByPrefix {
id: ApplicationId,
key_prefix: Vec<u8>,
callback: Sender<Vec<(Vec<u8>, Vec<u8>)>>,
},
WriteBatch {
id: ApplicationId,
batch: Batch,
callback: Sender<()>,
},
OpenChain {
ownership: ChainOwnership,
balance: Amount,
parent_id: ChainId,
block_height: BlockHeight,
application_permissions: ApplicationPermissions,
timestamp: Timestamp,
callback: Sender<ChainId>,
},
CloseChain {
application_id: ApplicationId,
callback: Sender<Result<(), ExecutionError>>,
},
ChangeApplicationPermissions {
application_id: ApplicationId,
application_permissions: ApplicationPermissions,
callback: Sender<Result<(), ExecutionError>>,
},
CreateApplication {
chain_id: ChainId,
block_height: BlockHeight,
module_id: ModuleId,
parameters: Vec<u8>,
required_application_ids: Vec<ApplicationId>,
callback: Sender<Result<CreateApplicationResult, ExecutionError>>,
},
PerformHttpRequest {
request: Request,
http_responses_are_oracle_responses: bool,
callback: Sender<Response>,
},
ReadBlobContent {
blob_id: BlobId,
callback: Sender<BlobContent>,
},
AssertBlobExists {
blob_id: BlobId,
callback: Sender<()>,
},
Emit {
stream_id: StreamId,
value: Vec<u8>,
callback: Sender<u32>,
},
ReadEvent {
event_id: EventId,
callback: Sender<Vec<u8>>,
},
SubscribeToEvents {
chain_id: ChainId,
stream_id: StreamId,
subscriber_app_id: ApplicationId,
callback: Sender<()>,
},
UnsubscribeFromEvents {
chain_id: ChainId,
stream_id: StreamId,
subscriber_app_id: ApplicationId,
callback: Sender<()>,
},
GetApplicationPermissions {
callback: Sender<ApplicationPermissions>,
},
QueryServiceOracle {
deadline: Option<Instant>,
application_id: ApplicationId,
next_block_height: BlockHeight,
query: Vec<u8>,
callback: Sender<Vec<u8>>,
},
AddOutgoingMessage {
message: OutgoingMessage,
callback: Sender<()>,
},
SetLocalTime {
local_time: Timestamp,
callback: Sender<()>,
},
AssertBefore {
timestamp: Timestamp,
callback: Sender<Result<(), ExecutionError>>,
},
AddCreatedBlob {
blob: Blob,
callback: Sender<()>,
},
ValidationRound {
round: Option<u32>,
callback: Sender<Option<u32>>,
},
}Expand description
Requests to the execution state.
Variants§
LoadContract
LoadService
ChainBalance
OwnerBalance
OwnerBalances
Fields
§
callback: Sender<Vec<(AccountOwner, Amount)>>BalanceOwners
Fields
§
callback: Sender<Vec<AccountOwner>>Transfer
Claim
SystemTimestamp
ChainOwnership
Fields
§
callback: Sender<ChainOwnership>ReadValueBytes
ContainsKey
ContainsKeys
ReadMultiValuesBytes
FindKeysByPrefix
FindKeyValuesByPrefix
WriteBatch
OpenChain
Fields
§
ownership: ChainOwnership§
block_height: BlockHeight§
application_permissions: ApplicationPermissionsCloseChain
ChangeApplicationPermissions
Fields
§
application_id: ApplicationId§
application_permissions: ApplicationPermissions§
callback: Sender<Result<(), ExecutionError>>CreateApplication
Fields
§
block_height: BlockHeight§
required_application_ids: Vec<ApplicationId>§
callback: Sender<Result<CreateApplicationResult, ExecutionError>>PerformHttpRequest
ReadBlobContent
AssertBlobExists
Emit
ReadEvent
SubscribeToEvents
UnsubscribeFromEvents
GetApplicationPermissions
Fields
§
callback: Sender<ApplicationPermissions>QueryServiceOracle
AddOutgoingMessage
SetLocalTime
AssertBefore
AddCreatedBlob
ValidationRound
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ExecutionRequest
impl !RefUnwindSafe for ExecutionRequest
impl Send for ExecutionRequest
impl Sync for ExecutionRequest
impl Unpin for ExecutionRequest
impl !UnwindSafe for ExecutionRequest
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<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
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 moreSource§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
Source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length bytes from memory from the provided location.
Source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes to memory at the provided location.