pub enum ExecutionRequest {
Show 39 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>,
},
ApplicationPermissions {
callback: Sender<ApplicationPermissions>,
},
ReadApplicationDescription {
application_id: ApplicationId,
callback: Sender<ApplicationDescription>,
},
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>>,
},
ChangeOwnership {
application_id: ApplicationId,
ownership: ChainOwnership,
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>>,
},
AllowApplicationLogs {
callback: Sender<bool>,
},
}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>ApplicationPermissions
Fields
§
callback: Sender<ApplicationPermissions>ReadApplicationDescription
ReadValueBytes
ContainsKey
ContainsKeys
ReadMultiValuesBytes
FindKeysByPrefix
FindKeyValuesByPrefix
WriteBatch
OpenChain
Fields
§
ownership: ChainOwnership§
block_height: BlockHeight§
application_permissions: ApplicationPermissionsCloseChain
ChangeOwnership
Fields
§
application_id: ApplicationId§
ownership: ChainOwnership§
callback: Sender<Result<(), ExecutionError>>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
AllowApplicationLogs
Trait Implementations§
Source§impl AsRef<str> for ExecutionRequest
impl AsRef<str> for ExecutionRequest
Auto Trait Implementations§
impl !RefUnwindSafe for ExecutionRequest
impl !UnwindSafe for ExecutionRequest
impl Freeze for ExecutionRequest
impl Send for ExecutionRequest
impl Sync for ExecutionRequest
impl Unpin for ExecutionRequest
impl UnsafeUnpin for ExecutionRequest
Blanket Implementations§
impl<_INNER> AutoTraits for _INNER
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreimpl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSync for Twhere
T: Sync,
impl<T> Post for Twhere
T: Send + 'static,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§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.