pub struct StateMachine { /* private fields */ }
Implementations§
Source§impl StateMachine
impl StateMachine
pub fn new(binary_path: &str, debug: bool) -> Self
pub fn update_call( &self, canister_id: Principal, sender: Principal, method: &str, arg: Vec<u8>, ) -> Result<WasmResult, UserError>
pub fn query_call( &self, canister_id: Principal, sender: Principal, method: &str, arg: Vec<u8>, ) -> Result<WasmResult, UserError>
pub fn root_key(&self) -> Vec<u8> ⓘ
pub fn create_canister(&self, sender: Option<Principal>) -> Principal
pub fn create_canister_with_settings( &self, settings: Option<CanisterSettings>, sender: Option<Principal>, ) -> Principal
pub fn install_canister( &self, canister_id: Principal, wasm_module: Vec<u8>, arg: Vec<u8>, sender: Option<Principal>, )
pub fn upgrade_canister( &self, canister_id: Principal, wasm_module: Vec<u8>, arg: Vec<u8>, sender: Option<Principal>, ) -> Result<(), CallError>
pub fn reinstall_canister( &self, canister_id: Principal, wasm_module: Vec<u8>, arg: Vec<u8>, sender: Option<Principal>, ) -> Result<(), CallError>
pub fn start_canister( &self, canister_id: Principal, sender: Option<Principal>, ) -> Result<(), CallError>
pub fn stop_canister( &self, canister_id: Principal, sender: Option<Principal>, ) -> Result<(), CallError>
pub fn delete_canister( &self, canister_id: Principal, sender: Option<Principal>, ) -> Result<(), CallError>
pub fn canister_exists(&self, canister_id: Principal) -> bool
pub fn time(&self) -> SystemTime
pub fn set_time(&self, time: SystemTime)
pub fn advance_time(&self, duration: Duration)
pub fn tick(&self)
pub fn run_until_completion(&self, max_ticks: u64)
pub fn stable_memory(&self, canister_id: Principal) -> Vec<u8> ⓘ
pub fn set_stable_memory(&self, canister_id: Principal, data: ByteBuf)
pub fn cycle_balance(&self, canister_id: Principal) -> u128
pub fn add_cycles(&self, canister_id: Principal, amount: u128) -> u128
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for StateMachine
impl !RefUnwindSafe for StateMachine
impl Send for StateMachine
impl !Sync for StateMachine
impl Unpin for StateMachine
impl UnwindSafe for StateMachine
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