pub struct QueryOrUpdateCall<'agent, 'canister, Out> { /* private fields */ }Expand description
A management-canister read call that is issued as a (fast, non-replicated)
query call by default, or as a replicated update call via
as_update.
Query responses come from a single replica. The agent verifies the replica’s
signature unless query-signature verification was disabled, so a verified
query response is authenticated by the subnet. Use as_update
when a fully replicated, certified response is required, at the cost of a
slower update call.
Returned by ManagementCanister::canister_status and
ManagementCanister::canister_metrics.
Implementations§
Source§impl<'agent: 'canister, 'canister, Out> QueryOrUpdateCall<'agent, 'canister, Out>
impl<'agent: 'canister, 'canister, Out> QueryOrUpdateCall<'agent, 'canister, Out>
Sourcepub fn as_update(self) -> Self
pub fn as_update(self) -> Self
Issue this call as a replicated update call instead of the default query.
Sourcepub async fn call(self) -> Result<Out, AgentError>
pub async fn call(self) -> Result<Out, AgentError>
Perform the call, awaiting the full response: a single query round-trip
by default, or (after as_update) an update call
followed by polling for its result.