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
PublicErrorsuitable for IC boundaries
Internally, they delegate to workflow-level RPC implementations, preserving the layering:
user canister -> api -> workflow -> ops -> infra
Workflow returns internal [Error]; conversion to PublicError
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, PublicError>
pub async fn upgrade_canister_request( canister_pid: Principal, ) -> Result<UpgradeCanisterResponse, PublicError>
pub async fn response(request: Request) -> Result<Response, PublicError>
Auto Trait Implementations§
impl Freeze for RpcApi
impl RefUnwindSafe for RpcApi
impl Send for RpcApi
impl Sync for RpcApi
impl Unpin 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