pub struct CachedStandaloneCanisterFixtureGuard<'a> { /* private fields */ }Expand description
Exclusive lease of one independently restored standalone fixture.
The lease dereferences to StandaloneCanisterFixture, so existing call
helpers can borrow it without adding a second fixture API.
Methods from Deref<Target = StandaloneCanisterFixture>§
Sourcepub fn pocket_ic(&self) -> &PocketIc
pub fn pocket_ic(&self) -> &PocketIc
Borrow the PocketIC instance that owns this standalone fixture.
Sourcepub fn canister_id(&self) -> Principal
pub fn canister_id(&self) -> Principal
Read the installed canister id for this standalone fixture.
Sourcepub fn update_candid<T, A>(
&self,
method: &str,
args: A,
) -> Result<T, CandidCallError>
pub fn update_candid<T, A>( &self, method: &str, args: A, ) -> Result<T, CandidCallError>
Forward one typed update call to this fixture’s canister id.
Sourcepub fn update_candid_or_panic<T, A>(&self, method: &str, args: A) -> T
pub fn update_candid_or_panic<T, A>(&self, method: &str, args: A) -> T
Forward one typed update call to this fixture’s canister id, panicking on rejection or Candid codec failure.
This does not unwrap application-level results. For example,
update_candid_or_panic::<Result<T, E>, _>(...) returns Result<T, E>.
Sourcepub fn update_candid_as<T, A>(
&self,
caller: Principal,
method: &str,
args: A,
) -> Result<T, CandidCallError>
pub fn update_candid_as<T, A>( &self, caller: Principal, method: &str, args: A, ) -> Result<T, CandidCallError>
Forward one typed update call with an explicit caller to this fixture’s canister id.
Sourcepub fn update_candid_as_or_panic<T, A>(
&self,
caller: Principal,
method: &str,
args: A,
) -> T
pub fn update_candid_as_or_panic<T, A>( &self, caller: Principal, method: &str, args: A, ) -> T
Forward one typed update call with an explicit caller to this fixture’s canister id, panicking on rejection or Candid codec failure.
This does not unwrap application-level results. For example,
update_candid_as_or_panic::<Result<T, E>, _>(...) returns Result<T, E>.
Sourcepub fn query_candid<T, A>(
&self,
method: &str,
args: A,
) -> Result<T, CandidCallError>
pub fn query_candid<T, A>( &self, method: &str, args: A, ) -> Result<T, CandidCallError>
Forward one typed query call to this fixture’s canister id.
Sourcepub fn query_candid_or_panic<T, A>(&self, method: &str, args: A) -> T
pub fn query_candid_or_panic<T, A>(&self, method: &str, args: A) -> T
Forward one typed query call to this fixture’s canister id, panicking on rejection or Candid codec failure.
This does not unwrap application-level results. For example,
query_candid_or_panic::<Result<T, E>, _>(...) returns Result<T, E>.
Sourcepub fn query_candid_as<T, A>(
&self,
caller: Principal,
method: &str,
args: A,
) -> Result<T, CandidCallError>
pub fn query_candid_as<T, A>( &self, caller: Principal, method: &str, args: A, ) -> Result<T, CandidCallError>
Forward one typed query call with an explicit caller to this fixture’s canister id.
Sourcepub fn query_candid_as_or_panic<T, A>(
&self,
caller: Principal,
method: &str,
args: A,
) -> T
pub fn query_candid_as_or_panic<T, A>( &self, caller: Principal, method: &str, args: A, ) -> T
Forward one typed query call with an explicit caller to this fixture’s canister id, panicking on rejection or Candid codec failure.
This does not unwrap application-level results. For example,
query_candid_as_or_panic::<Result<T, E>, _>(...) returns Result<T, E>.