Enum linera_execution::system::SystemMessage
source · pub enum SystemMessage {
Credit {
account: Account,
amount: Amount,
},
Withdraw {
account: Account,
amount: Amount,
recipient: Recipient,
user_data: UserData,
},
OpenChain {
ownership: ChainOwnership,
admin_id: ChainId,
epoch: Epoch,
committees: BTreeMap<Epoch, Committee>,
},
SetCommittees {
epoch: Epoch,
committees: BTreeMap<Epoch, Committee>,
},
Subscribe {
id: ChainId,
subscription: ChannelSubscription,
},
Unsubscribe {
id: ChainId,
subscription: ChannelSubscription,
},
BytecodePublished {
operation_index: u32,
},
ApplicationCreated,
BytecodeLocations {
locations: Vec<(BytecodeId, BytecodeLocation)>,
},
RegisterApplications {
applications: Vec<UserApplicationDescription>,
},
Notify {
id: ChainId,
},
RequestApplication(UserApplicationId),
}
Expand description
A system message meant to be executed on a remote chain.
Variants§
Credit
Credits amount
units of value to the account.
Withdraw
Withdraws amount
units of value from the account and starts a transfer to credit
the recipient. The message must be properly authenticated. Receiver chains may
refuse it depending on their configuration.
OpenChain
Fields
ownership: ChainOwnership
Creates (or activates) a new chain.
SetCommittees
Sets the current epoch and the recognized committees.
Subscribe
Subscribes to a channel.
Unsubscribe
Unsubscribes from a channel.
BytecodePublished
Notifies that a new application bytecode was published.
ApplicationCreated
Notifies that a new application was created.
BytecodeLocations
Fields
locations: Vec<(BytecodeId, BytecodeLocation)>
Shares the locations of published bytecodes.
RegisterApplications
Fields
applications: Vec<UserApplicationDescription>
Shares information about some applications to help the recipient use them. Applications must be registered after their dependencies.
Notify
Does nothing. Used to debug the intended recipients of a block.
RequestApplication(UserApplicationId)
Requests a RegisterApplication
message from the target chain to register the specified
application on the sender chain.
Implementations§
source§impl SystemMessage
impl SystemMessage
sourcepub fn bytecode_locations(
&self,
certificate_hash: CryptoHash
) -> Box<dyn Iterator<Item = BytecodeLocation> + '_>
pub fn bytecode_locations( &self, certificate_hash: CryptoHash ) -> Box<dyn Iterator<Item = BytecodeLocation> + '_>
Returns an iterator over all bytecode locations this message introduces to the receiving chain, given the hash of the certificate that it originates from.
Trait Implementations§
source§impl Clone for SystemMessage
impl Clone for SystemMessage
source§fn clone(&self) -> SystemMessage
fn clone(&self) -> SystemMessage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SystemMessage
impl Debug for SystemMessage
source§impl<'de> Deserialize<'de> for SystemMessage
impl<'de> Deserialize<'de> for SystemMessage
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl From<SystemMessage> for Message
impl From<SystemMessage> for Message
source§fn from(message: SystemMessage) -> Self
fn from(message: SystemMessage) -> Self
source§impl Hash for SystemMessage
impl Hash for SystemMessage
source§impl PartialEq<SystemMessage> for SystemMessage
impl PartialEq<SystemMessage> for SystemMessage
source§fn eq(&self, other: &SystemMessage) -> bool
fn eq(&self, other: &SystemMessage) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SystemMessage
impl Serialize for SystemMessage
impl Eq for SystemMessage
impl StructuralEq for SystemMessage
impl StructuralPartialEq for SystemMessage
Auto Trait Implementations§
impl RefUnwindSafe for SystemMessage
impl Send for SystemMessage
impl Sync for SystemMessage
impl Unpin for SystemMessage
impl UnwindSafe for SystemMessage
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.