pub struct AppCall(pub CanisterId);Tuple Fields§
§0: CanisterIdImplementations§
source§impl AppCall
impl AppCall
pub fn canister_id(&self) -> CanisterId
sourcepub async fn create_with_cycles(
controllers: Vec<ControllerId>,
cycles: u128,
) -> Result<Self, AppCallError>
pub async fn create_with_cycles( controllers: Vec<ControllerId>, cycles: u128, ) -> Result<Self, AppCallError>
create a new canister and save the canister id.
sourcepub async fn validate_user(
&self,
user_id: Principal,
) -> Result<bool, AppCallError>
pub async fn validate_user( &self, user_id: Principal, ) -> Result<bool, AppCallError>
Get the owner of the canister.
sourcepub async fn version(&self) -> Result<AppVersion, AppCallError>
pub async fn version(&self) -> Result<AppVersion, AppCallError>
Get the version of the canister.
sourcepub async fn status(&self) -> Result<AppStatus, AppCallError>
pub async fn status(&self) -> Result<AppStatus, AppCallError>
Get the status of the canister. The caller must be a controller of the canister.
sourcepub async fn info(
&self,
num_requested_changes: Option<u64>,
) -> Result<CanisterInfoResponse, AppCallError>
pub async fn info( &self, num_requested_changes: Option<u64>, ) -> Result<CanisterInfoResponse, AppCallError>
Get the status of the canister. The caller must be a controller of the canister.
sourcepub async fn module_hash(&self) -> Result<Option<Vec<u8>>, AppCallError>
pub async fn module_hash(&self) -> Result<Option<Vec<u8>>, AppCallError>
Get the module hash of the canister.
sourcepub async fn request_join(
&self,
args: RequestJoinArgs,
) -> Result<OperationId, AppCallError>
pub async fn request_join( &self, args: RequestJoinArgs, ) -> Result<OperationId, AppCallError>
Request to join the canister.
sourcepub async fn install_code(
&self,
args: AppInstallArg,
) -> Result<(), AppCallError>
pub async fn install_code( &self, args: AppInstallArg, ) -> Result<(), AppCallError>
Install the code for the canister.
sourcepub async fn uninstall_code(&self) -> Result<(), AppCallError>
pub async fn uninstall_code(&self) -> Result<(), AppCallError>
Uninstall the code for the canister. The caller must be a controller of the canister.
sourcepub async fn add_controllers(
&self,
controllers: ControllerIds,
) -> Result<(), AppCallError>
pub async fn add_controllers( &self, controllers: ControllerIds, ) -> Result<(), AppCallError>
Update the controllers of the canister. The caller must be a controller of the canister. Default controllers are the owner and the user itself.
Trait Implementations§
source§impl CandidType for AppCall
impl CandidType for AppCall
source§impl<'de> Deserialize<'de> for AppCall
impl<'de> Deserialize<'de> for AppCall
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for AppCall
Auto Trait Implementations§
impl Freeze for AppCall
impl RefUnwindSafe for AppCall
impl Send for AppCall
impl Sync for AppCall
impl Unpin for AppCall
impl UnwindSafe for AppCall
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)