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 preserves typed internal failures; conversion to Error happens
exclusively at this API boundary.
Implementations§
Source§impl RpcApi
impl RpcApi
Sourcepub async fn response_capability_v1_root(
envelope: RootCapabilityEnvelopeV1,
authority: RootCapabilityAuthority,
lifecycle: &dyn RootCapabilityLifecycleExecutor,
) -> Result<RootCapabilityResponseV1, Error>
pub async fn response_capability_v1_root( envelope: RootCapabilityEnvelopeV1, authority: RootCapabilityAuthority, lifecycle: &dyn RootCapabilityLifecycleExecutor, ) -> Result<RootCapabilityResponseV1, Error>
Dispatch the full root capability envelope verifier/orchestrator path.
Sourcepub async fn response_capability_v1_nonroot(
envelope: NonrootCyclesCapabilityEnvelopeV1,
) -> Result<NonrootCyclesCapabilityResponseV1, Error>
pub async fn response_capability_v1_nonroot( envelope: NonrootCyclesCapabilityEnvelopeV1, ) -> Result<NonrootCyclesCapabilityResponseV1, Error>
Dispatch the non-root structural cycles capability path.
Sourcepub async fn create_canister_request<A>(
operation_id: [u8; 32],
canister_role: &CanisterRole,
parent: CreateCanisterParent,
extra: Option<A>,
) -> Result<CreateCanisterResponse, Error>
pub async fn create_canister_request<A>( operation_id: [u8; 32], canister_role: &CanisterRole, parent: CreateCanisterParent, extra: Option<A>, ) -> Result<CreateCanisterResponse, Error>
Request one role-admitted direct child through the local Fleet Subnet Root.
The application must durably allocate a nonzero operation_id before
calling and reuse that exact identity after an interrupted or uncertain
result. Reusing the identity with a different request is rejected.
pub async fn request_cycles(cycles: u128) -> Result<CyclesResponse, 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