Struct Runtime

Source
pub struct Runtime { /* private fields */ }

Implementations§

Source§

impl Runtime

Source

pub fn new() -> Self

Source

pub async fn send(&mut self, request: Request)

Send a request to the execution thread and waits until it’s finished.

Source

pub fn explicit_trap(&mut self, message: String) -> !

Trait Implementations§

Source§

impl Ic0CallHandler for Runtime

Source§

fn msg_arg_data_size(&mut self) -> isize

Source§

fn msg_arg_data_copy(&mut self, dst: isize, offset: isize, size: isize)

Source§

fn msg_caller_size(&mut self) -> isize

Source§

fn msg_caller_copy(&mut self, dst: isize, offset: isize, size: isize)

Source§

fn msg_reject_code(&mut self) -> i32

Source§

fn msg_reject_msg_size(&mut self) -> isize

Source§

fn msg_reject_msg_copy(&mut self, dst: isize, offset: isize, size: isize)

Source§

fn msg_reply_data_append(&mut self, src: isize, size: isize)

Source§

fn msg_reply(&mut self)

Source§

fn msg_reject(&mut self, src: isize, size: isize)

Source§

fn msg_cycles_available(&mut self) -> i64

Source§

fn msg_cycles_available128(&mut self, dst: isize)

Source§

fn msg_cycles_refunded(&mut self) -> i64

Source§

fn msg_cycles_refunded128(&mut self, dst: isize)

Source§

fn msg_cycles_accept(&mut self, max_amount: i64) -> i64

Source§

fn msg_cycles_accept128( &mut self, max_amount_high: i64, max_amount_low: i64, dst: isize, )

Source§

fn canister_self_size(&mut self) -> isize

Source§

fn canister_self_copy(&mut self, dst: isize, offset: isize, size: isize)

Source§

fn canister_cycle_balance(&mut self) -> i64

Source§

fn canister_cycle_balance128(&mut self, dst: isize)

Source§

fn canister_status(&mut self) -> i32

Source§

fn msg_method_name_size(&mut self) -> isize

Source§

fn msg_method_name_copy(&mut self, dst: isize, offset: isize, size: isize)

Source§

fn accept_message(&mut self)

Source§

fn call_new( &mut self, callee_src: isize, callee_size: isize, name_src: isize, name_size: isize, reply_fun: isize, reply_env: isize, reject_fun: isize, reject_env: isize, )

Source§

fn call_on_cleanup(&mut self, fun: isize, env: isize)

Source§

fn call_data_append(&mut self, src: isize, size: isize)

Source§

fn call_cycles_add(&mut self, amount: i64)

Source§

fn call_cycles_add128(&mut self, amount_high: i64, amount_low: i64)

Source§

fn call_perform(&mut self) -> i32

Source§

fn stable_size(&mut self) -> i32

Source§

fn stable_grow(&mut self, new_pages: i32) -> i32

Source§

fn stable_write(&mut self, offset: i32, src: isize, size: isize)

Source§

fn stable_read(&mut self, dst: isize, offset: i32, size: isize)

Source§

fn stable64_size(&mut self) -> i64

Source§

fn stable64_grow(&mut self, new_pages: i64) -> i64

Source§

fn stable64_write(&mut self, offset: i64, src: i64, size: i64)

Source§

fn stable64_read(&mut self, dst: i64, offset: i64, size: i64)

Source§

fn certified_data_set(&mut self, src: isize, size: isize)

Source§

fn data_certificate_present(&mut self) -> i32

Source§

fn data_certificate_size(&mut self) -> isize

Source§

fn data_certificate_copy(&mut self, dst: isize, offset: isize, size: isize)

Source§

fn time(&mut self) -> i64

Source§

fn performance_counter(&mut self, counter_type: i32) -> i64

Source§

fn debug_print(&mut self, src: isize, size: isize)

Source§

fn trap(&mut self, src: isize, size: isize)

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.