pub struct RpcApi;Expand description
RpcApi
Public, user-callable wrappers for Canic’s internal RPC workflows.
These functions:
- form part of the public API surface
- are safe to call from downstream canister
lib.rscode - return
Errorsuitable for IC boundaries
Internally, they delegate to workflow-level RPC implementations, preserving the layering:
user canister -> api -> workflow -> ops -> infra
Workflow returns internal [InternalError]; conversion to Error
happens exclusively at this API boundary.
Implementations§
Source§impl RpcApi
impl RpcApi
Sourcepub async fn response_capability_v1_root(
envelope: RootCapabilityEnvelopeV1,
) -> Result<RootCapabilityResponseV1, Error>
pub async fn response_capability_v1_root( envelope: RootCapabilityEnvelopeV1, ) -> Result<RootCapabilityResponseV1, Error>
Dispatch the full root capability envelope verifier/orchestrator path.
Sourcepub async fn response_capability_v1_nonroot(
envelope: RootCapabilityEnvelopeV1,
) -> Result<RootCapabilityResponseV1, Error>
pub async fn response_capability_v1_nonroot( envelope: RootCapabilityEnvelopeV1, ) -> Result<RootCapabilityResponseV1, Error>
Dispatch the non-root structural cycles capability path.
pub async fn create_canister_request<A>( canister_role: &CanisterRole, parent: CreateCanisterParent, extra: Option<A>, ) -> Result<CreateCanisterResponse, Error>
pub async fn upgrade_canister_request( canister_pid: Principal, ) -> Result<UpgradeCanisterResponse, Error>
pub async fn response_capability_v1( envelope: RootCapabilityEnvelopeV1, ) -> Result<RootCapabilityResponseV1, Error>
Auto Trait Implementations§
impl Freeze for RpcApi
impl RefUnwindSafe for RpcApi
impl Send for RpcApi
impl Sync for RpcApi
impl Unpin for RpcApi
impl UnsafeUnpin for RpcApi
impl UnwindSafe for RpcApi
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