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
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(request: Request) -> Result<Response, 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