pub struct Replica { /* private fields */ }Expand description
A local replica that contains one or several canisters.
Implementations
sourceimpl Replica
impl Replica
sourcepub fn new(canisters: Vec<Canister, Global>) -> Replica
pub fn new(canisters: Vec<Canister, Global>) -> Replica
Create a new replica with the given canister.
sourcepub fn add_canister(&self, canister: Canister) -> CanisterHandle<'_>
pub fn add_canister(&self, canister: Canister) -> CanisterHandle<'_>
Add the given canister to this replica.
sourcepub fn get_canister(&self, canister_id: Principal) -> CanisterHandle<'_>
pub fn get_canister(&self, canister_id: Principal) -> CanisterHandle<'_>
Return the handle to a canister.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Replica
impl Send for Replica
impl Sync for Replica
impl Unpin for Replica
impl !UnwindSafe for Replica
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more