Function ic_cdk::api::call::call_raw

source ·
pub fn call_raw<'a, T: AsRef<[u8]> + Send + Sync + 'a>(
    id: Principal,
    method: &str,
    args_raw: T,
    payment: u64,
) -> impl Future<Output = CallResult<Vec<u8>>> + Send + Sync + 'a
Expand description

Performs an asynchronous call to another canister and pay cycles at the same time.

Treats arguments and returns as raw bytes. No data serialization and deserialization is performed.

§Example

It can be called:

async fn call_add_user() -> Vec<u8>{
    call_raw(callee_canister(), "add_user", b"abcd", 1_000_000u64).await.unwrap()
}