Struct linera_core::client::ChainClient
source · pub struct ChainClient<ValidatorNodeProvider, Storage>where
Storage: Storage,{ /* private fields */ }
Expand description
Client to operate a chain by interacting with validators and the given local storage implementation.
- The chain being operated is called the “local chain” or just the “chain”.
- As a rule, operations are considered successful (and communication may stop) when they succeeded in gathering a quorum of responses.
Implementations§
source§impl<P: 'static, S: Storage> ChainClient<P, S>
impl<P: 'static, S: Storage> ChainClient<P, S>
sourcepub fn state(&self) -> ChainGuard<'_, ChainClientState>
pub fn state(&self) -> ChainGuard<'_, ChainClientState>
Gets a shared reference to the chain’s state.
sourcepub fn options_mut(&mut self) -> &mut ChainClientOptions
pub fn options_mut(&mut self) -> &mut ChainClientOptions
Gets a mutable reference to the per-ChainClient
options.
sourcepub fn options(&self) -> &ChainClientOptions
pub fn options(&self) -> &ChainClientOptions
Gets a reference to the per-ChainClient
options.
sourcepub fn block_hash(&self) -> Option<CryptoHash>
pub fn block_hash(&self) -> Option<CryptoHash>
Gets the hash of the latest known block.
sourcepub fn next_block_height(&self) -> BlockHeight
pub fn next_block_height(&self) -> BlockHeight
Gets the next block height.
sourcepub fn pending_proposal(&self) -> ChainGuardMapped<'_, Option<PendingProposal>>
pub fn pending_proposal(&self) -> ChainGuardMapped<'_, Option<PendingProposal>>
Gets a guarded reference to the next pending block.
source§impl<P, S> ChainClient<P, S>
impl<P, S> ChainClient<P, S>
sourcepub async fn chain_state_view(
&self,
) -> Result<OwnedRwLockReadGuard<ChainStateView<S::Context>>, LocalNodeError>
pub async fn chain_state_view( &self, ) -> Result<OwnedRwLockReadGuard<ChainStateView<S::Context>>, LocalNodeError>
Obtains a ChainStateView
for this client’s chain.
sourcepub async fn subscribe(&self) -> Result<NotificationStream, LocalNodeError>
pub async fn subscribe(&self) -> Result<NotificationStream, LocalNodeError>
Subscribes to notifications from this client’s chain.
sourcepub fn storage_client(&self) -> S
pub fn storage_client(&self) -> S
Returns the storage client used by this client’s local node.
sourcepub async fn chain_info(&self) -> Result<Box<ChainInfo>, LocalNodeError>
pub async fn chain_info(&self) -> Result<Box<ChainInfo>, LocalNodeError>
Obtains the basic ChainInfo
data for the local chain.
sourcepub async fn chain_info_with_manager_values(
&self,
) -> Result<Box<ChainInfo>, LocalNodeError>
pub async fn chain_info_with_manager_values( &self, ) -> Result<Box<ChainInfo>, LocalNodeError>
Obtains the basic ChainInfo
data for the local chain, with chain manager values.
sourcepub async fn epoch_and_committees(
&self,
chain_id: ChainId,
) -> Result<(Option<Epoch>, BTreeMap<Epoch, Committee>), LocalNodeError>
pub async fn epoch_and_committees( &self, chain_id: ChainId, ) -> Result<(Option<Epoch>, BTreeMap<Epoch, Committee>), LocalNodeError>
Obtains the current epoch of the given chain as well as its set of trusted committees.
sourcepub async fn epochs(&self) -> Result<Vec<Epoch>, LocalNodeError>
pub async fn epochs(&self) -> Result<Vec<Epoch>, LocalNodeError>
Obtains the epochs of the committees trusted by the local chain.
sourcepub async fn local_committee(&self) -> Result<Committee, LocalNodeError>
pub async fn local_committee(&self) -> Result<Committee, LocalNodeError>
Obtains the committee for the current epoch of the local chain.
sourcepub async fn identity(&self) -> Result<Owner, ChainClientError>
pub async fn identity(&self) -> Result<Owner, ChainClientError>
Obtains the identity of the current owner of the chain. Returns an error if we have the private key for more than one identity.
sourcepub async fn key_pair(&self) -> Result<AccountSecretKey, ChainClientError>
pub async fn key_pair(&self) -> Result<AccountSecretKey, ChainClientError>
Obtains the key pair associated to the current identity.
sourcepub async fn public_key(&self) -> Result<AccountPublicKey, ChainClientError>
pub async fn public_key(&self) -> Result<AccountPublicKey, ChainClientError>
Obtains the public key associated to the current identity.
sourcepub async fn prepare_chain(&self) -> Result<Box<ChainInfo>, ChainClientError>
pub async fn prepare_chain(&self) -> Result<Box<ChainInfo>, ChainClientError>
Prepares the chain for the next operation, i.e. makes sure we have synchronized it up to its current height and are not missing any received messages from the inbox.
pub async fn synchronize_until( &self, next_block_height: BlockHeight, ) -> Result<Box<ChainInfo>, ChainClientError>
sourcepub async fn submit_block_proposal<T: ProcessableCertificate>(
&self,
committee: &Committee,
proposal: Box<BlockProposal>,
value: Hashed<T>,
) -> Result<GenericCertificate<T>, ChainClientError>
pub async fn submit_block_proposal<T: ProcessableCertificate>( &self, committee: &Committee, proposal: Box<BlockProposal>, value: Hashed<T>, ) -> Result<GenericCertificate<T>, ChainClientError>
Submits a block proposal to the validators.
sourcepub async fn update_validators(
&self,
old_committee: Option<&Committee>,
) -> Result<(), ChainClientError>
pub async fn update_validators( &self, old_committee: Option<&Committee>, ) -> Result<(), ChainClientError>
Attempts to update all validators about the local chain.
sourcepub async fn communicate_chain_updates(
&self,
committee: &Committee,
chain_id: ChainId,
height: BlockHeight,
delivery: CrossChainMessageDelivery,
) -> Result<(), ChainClientError>
pub async fn communicate_chain_updates( &self, committee: &Committee, chain_id: ChainId, height: BlockHeight, delivery: CrossChainMessageDelivery, ) -> Result<(), ChainClientError>
Broadcasts certified blocks to validators.
sourcepub async fn transfer(
&self,
owner: Option<Owner>,
amount: Amount,
recipient: Recipient,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn transfer( &self, owner: Option<Owner>, amount: Amount, recipient: Recipient, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Sends money.
sourcepub async fn read_data_blob(
&self,
hash: CryptoHash,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn read_data_blob( &self, hash: CryptoHash, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Verify if a data blob is readable from storage.
sourcepub async fn claim(
&self,
owner: Owner,
target_id: ChainId,
recipient: Recipient,
amount: Amount,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn claim( &self, owner: Owner, target_id: ChainId, recipient: Recipient, amount: Amount, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Claims money in a remote chain.
sourcepub async fn process_certificate<T: ProcessableCertificate>(
&self,
certificate: GenericCertificate<T>,
) -> Result<(), LocalNodeError>
pub async fn process_certificate<T: ProcessableCertificate>( &self, certificate: GenericCertificate<T>, ) -> Result<(), LocalNodeError>
Handles the certificate in the local node and the resulting notifications.
sourcepub async fn request_leader_timeout(
&self,
) -> Result<TimeoutCertificate, ChainClientError>
pub async fn request_leader_timeout( &self, ) -> Result<TimeoutCertificate, ChainClientError>
Requests a leader timeout vote from all validators. If a quorum signs it, creates a certificate and sends it to all validators, to make them enter the next round.
sourcepub async fn receive_certificate_for_blob(
&self,
blob_id: BlobId,
) -> Result<(), ChainClientError>
pub async fn receive_certificate_for_blob( &self, blob_id: BlobId, ) -> Result<(), ChainClientError>
Downloads and processes a confirmed block certificate that uses the given blob. If this succeeds, the blob will be in our storage.
sourcepub async fn receive_certificates_for_blobs(
&self,
blob_ids: Vec<BlobId>,
) -> Result<(), ChainClientError>
pub async fn receive_certificates_for_blobs( &self, blob_ids: Vec<BlobId>, ) -> Result<(), ChainClientError>
Downloads and processes confirmed block certificates that use the given blobs. If this succeeds, the blobs will be in our storage.
sourcepub async fn execute_operations(
&self,
operations: Vec<Operation>,
blobs: Vec<Blob>,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn execute_operations( &self, operations: Vec<Operation>, blobs: Vec<Blob>, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Executes a list of operations.
sourcepub async fn execute_operation(
&self,
operation: Operation,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn execute_operation( &self, operation: Operation, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Executes an operation.
sourcepub async fn query_application(
&self,
query: Query,
) -> Result<QueryOutcome, ChainClientError>
pub async fn query_application( &self, query: Query, ) -> Result<QueryOutcome, ChainClientError>
Queries an application.
sourcepub async fn query_system_application(
&self,
query: SystemQuery,
) -> Result<QueryOutcome<SystemResponse>, ChainClientError>
pub async fn query_system_application( &self, query: SystemQuery, ) -> Result<QueryOutcome<SystemResponse>, ChainClientError>
Queries a system application.
sourcepub async fn query_user_application<A: Abi>(
&self,
application_id: UserApplicationId<A>,
query: &A::Query,
) -> Result<QueryOutcome<A::QueryResponse>, ChainClientError>
pub async fn query_user_application<A: Abi>( &self, application_id: UserApplicationId<A>, query: &A::Query, ) -> Result<QueryOutcome<A::QueryResponse>, ChainClientError>
Queries a user application.
sourcepub async fn query_balance(&self) -> Result<Amount, ChainClientError>
pub async fn query_balance(&self) -> Result<Amount, ChainClientError>
Obtains the local balance of the chain account after staging the execution of incoming messages in a new block.
Does not attempt to synchronize with validators. The result will reflect up to
max_pending_message_bundles
incoming message bundles and the execution fees for a single
block.
sourcepub async fn query_owner_balance(
&self,
owner: AccountOwner,
) -> Result<Amount, ChainClientError>
pub async fn query_owner_balance( &self, owner: AccountOwner, ) -> Result<Amount, ChainClientError>
Obtains the local balance of an account after staging the execution of incoming messages in a new block.
Does not attempt to synchronize with validators. The result will reflect up to
max_pending_message_bundles
incoming message bundles and the execution fees for a single
block.
sourcepub async fn local_balance(&self) -> Result<Amount, ChainClientError>
pub async fn local_balance(&self) -> Result<Amount, ChainClientError>
Reads the local balance of the chain account.
Does not process the inbox or attempt to synchronize with validators.
sourcepub async fn local_owner_balance(
&self,
owner: AccountOwner,
) -> Result<Amount, ChainClientError>
pub async fn local_owner_balance( &self, owner: AccountOwner, ) -> Result<Amount, ChainClientError>
Reads the local balance of a user account.
Does not process the inbox or attempt to synchronize with validators.
sourcepub async fn request_application(
&self,
application_id: UserApplicationId,
chain_id: Option<ChainId>,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn request_application( &self, application_id: UserApplicationId, chain_id: Option<ChainId>, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Requests a RegisterApplications
message from another chain so the application can be used
on this one.
sourcepub async fn transfer_to_account(
&self,
owner: Option<Owner>,
amount: Amount,
account: Account,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn transfer_to_account( &self, owner: Option<Owner>, amount: Amount, account: Account, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Sends tokens to a chain.
sourcepub async fn burn(
&self,
owner: Option<Owner>,
amount: Amount,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn burn( &self, owner: Option<Owner>, amount: Amount, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Burns tokens.
sourcepub async fn synchronize_from_validators(
&self,
) -> Result<Box<ChainInfo>, ChainClientError>
pub async fn synchronize_from_validators( &self, ) -> Result<Box<ChainInfo>, ChainClientError>
Attempts to synchronize chains that have sent us messages and populate our local inbox.
To create a block that actually executes the messages in the inbox,
process_inbox
must be called separately.
sourcepub async fn process_pending_block(
&self,
) -> Result<ClientOutcome<Option<ConfirmedBlockCertificate>>, ChainClientError>
pub async fn process_pending_block( &self, ) -> Result<ClientOutcome<Option<ConfirmedBlockCertificate>>, ChainClientError>
Processes the last pending block
sourcepub fn clear_pending_proposal(&self)
pub fn clear_pending_proposal(&self)
Clears the information on any operation that previously failed.
sourcepub async fn receive_certificate_and_update_validators(
&self,
certificate: ConfirmedBlockCertificate,
) -> Result<(), ChainClientError>
pub async fn receive_certificate_and_update_validators( &self, certificate: ConfirmedBlockCertificate, ) -> Result<(), ChainClientError>
Processes a confirmed block for which this chain is a recipient and updates validators.
sourcepub async fn receive_certificate(
&self,
certificate: ConfirmedBlockCertificate,
) -> Result<(), ChainClientError>
pub async fn receive_certificate( &self, certificate: ConfirmedBlockCertificate, ) -> Result<(), ChainClientError>
Processes confirmed operation for which this chain is a recipient.
sourcepub async fn rotate_key_pair(
&self,
key_pair: AccountSecretKey,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn rotate_key_pair( &self, key_pair: AccountSecretKey, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Rotates the key of the chain.
sourcepub async fn transfer_ownership(
&self,
new_owner: Owner,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn transfer_ownership( &self, new_owner: Owner, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Transfers ownership of the chain to a single super owner.
Adds another owner to the chain, and turns existing super owners into regular owners.
sourcepub async fn change_ownership(
&self,
ownership: ChainOwnership,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn change_ownership( &self, ownership: ChainOwnership, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Changes the ownership of this chain. Fails if it would remove existing owners, unless
remove_owners
is true
.
sourcepub async fn change_application_permissions(
&self,
application_permissions: ApplicationPermissions,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn change_application_permissions( &self, application_permissions: ApplicationPermissions, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Changes the application permissions configuration on this chain.
sourcepub async fn open_chain(
&self,
ownership: ChainOwnership,
application_permissions: ApplicationPermissions,
balance: Amount,
) -> Result<ClientOutcome<(MessageId, ConfirmedBlockCertificate)>, ChainClientError>
pub async fn open_chain( &self, ownership: ChainOwnership, application_permissions: ApplicationPermissions, balance: Amount, ) -> Result<ClientOutcome<(MessageId, ConfirmedBlockCertificate)>, ChainClientError>
Opens a new chain with a derived UID.
sourcepub async fn close_chain(
&self,
) -> Result<ClientOutcome<Option<ConfirmedBlockCertificate>>, ChainClientError>
pub async fn close_chain( &self, ) -> Result<ClientOutcome<Option<ConfirmedBlockCertificate>>, ChainClientError>
Closes the chain (and loses everything in it!!).
Returns None
if the chain was already closed.
sourcepub async fn publish_bytecode(
&self,
contract: Bytecode,
service: Bytecode,
vm_runtime: VmRuntime,
) -> Result<ClientOutcome<(BytecodeId, ConfirmedBlockCertificate)>, ChainClientError>
pub async fn publish_bytecode( &self, contract: Bytecode, service: Bytecode, vm_runtime: VmRuntime, ) -> Result<ClientOutcome<(BytecodeId, ConfirmedBlockCertificate)>, ChainClientError>
Publishes some bytecode.
sourcepub async fn publish_bytecode_blobs(
&self,
contract_blob: Blob,
service_blob: Blob,
bytecode_id: BytecodeId,
) -> Result<ClientOutcome<(BytecodeId, ConfirmedBlockCertificate)>, ChainClientError>
pub async fn publish_bytecode_blobs( &self, contract_blob: Blob, service_blob: Blob, bytecode_id: BytecodeId, ) -> Result<ClientOutcome<(BytecodeId, ConfirmedBlockCertificate)>, ChainClientError>
Publishes some bytecode.
sourcepub async fn publish_data_blobs(
&self,
bytes: Vec<Vec<u8>>,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn publish_data_blobs( &self, bytes: Vec<Vec<u8>>, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Publishes some data blobs.
sourcepub async fn publish_data_blob(
&self,
bytes: Vec<u8>,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn publish_data_blob( &self, bytes: Vec<u8>, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Publishes some data blob.
sourcepub async fn create_application<A: Abi, Parameters: Serialize, InstantiationArgument: Serialize>(
&self,
bytecode_id: BytecodeId<A, Parameters, InstantiationArgument>,
parameters: &Parameters,
instantiation_argument: &InstantiationArgument,
required_application_ids: Vec<UserApplicationId>,
) -> Result<ClientOutcome<(UserApplicationId<A>, ConfirmedBlockCertificate)>, ChainClientError>
pub async fn create_application<A: Abi, Parameters: Serialize, InstantiationArgument: Serialize>( &self, bytecode_id: BytecodeId<A, Parameters, InstantiationArgument>, parameters: &Parameters, instantiation_argument: &InstantiationArgument, required_application_ids: Vec<UserApplicationId>, ) -> Result<ClientOutcome<(UserApplicationId<A>, ConfirmedBlockCertificate)>, ChainClientError>
Creates an application by instantiating some bytecode.
sourcepub async fn create_application_untyped(
&self,
bytecode_id: BytecodeId,
parameters: Vec<u8>,
instantiation_argument: Vec<u8>,
required_application_ids: Vec<UserApplicationId>,
) -> Result<ClientOutcome<(UserApplicationId, ConfirmedBlockCertificate)>, ChainClientError>
pub async fn create_application_untyped( &self, bytecode_id: BytecodeId, parameters: Vec<u8>, instantiation_argument: Vec<u8>, required_application_ids: Vec<UserApplicationId>, ) -> Result<ClientOutcome<(UserApplicationId, ConfirmedBlockCertificate)>, ChainClientError>
Creates an application by instantiating some bytecode.
sourcepub async fn stage_new_committee(
&self,
committee: Committee,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn stage_new_committee( &self, committee: Committee, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Creates a new committee and starts using it (admin chains only).
sourcepub async fn process_inbox(
&self,
) -> Result<(Vec<ConfirmedBlockCertificate>, Option<RoundTimeout>), ChainClientError>
pub async fn process_inbox( &self, ) -> Result<(Vec<ConfirmedBlockCertificate>, Option<RoundTimeout>), ChainClientError>
Synchronizes the chain with the validators and creates blocks without any operations to process all incoming messages. This may require several blocks.
If not all certificates could be processed due to a timeout, the timestamp for when to retry is returned, too.
sourcepub async fn process_inbox_without_prepare(
&self,
) -> Result<(Vec<ConfirmedBlockCertificate>, Option<RoundTimeout>), ChainClientError>
pub async fn process_inbox_without_prepare( &self, ) -> Result<(Vec<ConfirmedBlockCertificate>, Option<RoundTimeout>), ChainClientError>
Creates blocks without any operations to process all incoming messages. This may require several blocks.
If not all certificates could be processed due to a timeout, the timestamp for when to retry is returned, too.
sourcepub async fn subscribe_to_new_committees(
&self,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn subscribe_to_new_committees( &self, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Starts listening to the admin chain for new committees. (This is only useful for other genesis chains or for testing.)
sourcepub async fn unsubscribe_from_new_committees(
&self,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn unsubscribe_from_new_committees( &self, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Stops listening to the admin chain for new committees. (This is only useful for testing.)
sourcepub async fn finalize_committee(
&self,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn finalize_committee( &self, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Deprecates all the configurations of voting rights but the last one (admin chains only). Currently, each individual chain is still entitled to wait before accepting this command. However, it is expected that deprecated validators stop functioning shortly after such command is issued.
sourcepub async fn transfer_to_account_unsafe_unconfirmed(
&self,
owner: Option<Owner>,
amount: Amount,
account: Account,
) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
pub async fn transfer_to_account_unsafe_unconfirmed( &self, owner: Option<Owner>, amount: Amount, account: Account, ) -> Result<ClientOutcome<ConfirmedBlockCertificate>, ChainClientError>
Sends money to a chain. Do not check balance. (This may block the client) Do not confirm the transaction.
pub async fn read_hashed_confirmed_block( &self, hash: CryptoHash, ) -> Result<Hashed<ConfirmedBlock>, ViewError>
sourcepub async fn retry_pending_outgoing_messages(
&self,
) -> Result<(), ChainClientError>
pub async fn retry_pending_outgoing_messages( &self, ) -> Result<(), ChainClientError>
Handles any cross-chain requests for any pending outgoing messages.
pub async fn read_hashed_confirmed_blocks_downward( &self, from: CryptoHash, limit: u32, ) -> Result<Vec<Hashed<ConfirmedBlock>>, ViewError>
sourcepub async fn listen(
&self,
) -> Result<(impl Future<Output = ()>, AbortOnDrop, NotificationStream), ChainClientError>
pub async fn listen( &self, ) -> Result<(impl Future<Output = ()>, AbortOnDrop, NotificationStream), ChainClientError>
Spawns a task that listens to notifications about the current chain from all validators, and synchronizes the local state accordingly.
sourcepub async fn sync_validator(
&self,
remote_node: P::Node,
) -> Result<(), ChainClientError>
pub async fn sync_validator( &self, remote_node: P::Node, ) -> Result<(), ChainClientError>
Attempts to update a validator with the local information.
Trait Implementations§
source§impl<P, S> Clone for ChainClient<P, S>where
S: Storage,
impl<P, S> Clone for ChainClient<P, S>where
S: Storage,
Auto Trait Implementations§
impl<ValidatorNodeProvider, Storage> Freeze for ChainClient<ValidatorNodeProvider, Storage>
impl<ValidatorNodeProvider, Storage> !RefUnwindSafe for ChainClient<ValidatorNodeProvider, Storage>
impl<ValidatorNodeProvider, Storage> Send for ChainClient<ValidatorNodeProvider, Storage>
impl<ValidatorNodeProvider, Storage> Sync for ChainClient<ValidatorNodeProvider, Storage>
impl<ValidatorNodeProvider, Storage> Unpin for ChainClient<ValidatorNodeProvider, Storage>
impl<ValidatorNodeProvider, Storage> !UnwindSafe for ChainClient<ValidatorNodeProvider, Storage>
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.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>
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>
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<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
source§impl<T> MockResults for T
impl<T> MockResults for T
§type Results = T
type Results = T
MockInstance
.source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.source§impl<T> Pointable for T
impl<T> Pointable for T
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
.
source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.