pub struct StandaloneCanisterFixture { /* private fields */ }Expand description
StandaloneCanisterFixture
Implementations§
Source§impl StandaloneCanisterFixture
impl StandaloneCanisterFixture
Sourcepub const fn pic(&self) -> &Pic
pub const fn pic(&self) -> &Pic
Borrow the PocketIC instance that owns this standalone fixture.
Sourcepub const fn pic_mut(&mut self) -> &mut Pic
pub const fn pic_mut(&mut self) -> &mut Pic
Mutably borrow the PocketIC instance that owns this standalone fixture.
Sourcepub const fn canister_id(&self) -> Principal
pub const fn canister_id(&self) -> Principal
Read the installed canister id for this standalone fixture.
Sourcepub fn into_parts(self) -> (Pic, Principal)
pub fn into_parts(self) -> (Pic, Principal)
Consume the fixture and return the owned PocketIC instance and canister id.
Sourcepub fn update_call<T, A>(
&self,
method: &str,
args: A,
) -> Result<T, PicCallError>
pub fn update_call<T, A>( &self, method: &str, args: A, ) -> Result<T, PicCallError>
Forward one typed update call to this fixture’s canister id.
Sourcepub fn update_call_as<T, A>(
&self,
caller: Principal,
method: &str,
args: A,
) -> Result<T, PicCallError>
pub fn update_call_as<T, A>( &self, caller: Principal, method: &str, args: A, ) -> Result<T, PicCallError>
Forward one typed update call with an explicit caller to this fixture’s canister id.
Sourcepub fn query_call<T, A>(&self, method: &str, args: A) -> Result<T, PicCallError>
pub fn query_call<T, A>(&self, method: &str, args: A) -> Result<T, PicCallError>
Forward one typed query call to this fixture’s canister id.
Sourcepub fn query_call_as<T, A>(
&self,
caller: Principal,
method: &str,
args: A,
) -> Result<T, PicCallError>
pub fn query_call_as<T, A>( &self, caller: Principal, method: &str, args: A, ) -> Result<T, PicCallError>
Forward one typed query call with an explicit caller to this fixture’s canister id.
Auto Trait Implementations§
impl Freeze for StandaloneCanisterFixture
impl !RefUnwindSafe for StandaloneCanisterFixture
impl Send for StandaloneCanisterFixture
impl Sync for StandaloneCanisterFixture
impl Unpin for StandaloneCanisterFixture
impl UnsafeUnpin for StandaloneCanisterFixture
impl !UnwindSafe for StandaloneCanisterFixture
Blanket Implementations§
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