pub struct TestRuntime<R> { /* private fields */ }Implementations§
Source§impl<R> TestRuntime<R>
impl<R> TestRuntime<R>
pub fn new() -> Self
pub fn new_context( &self, task_key: TaskKey, address_lease: Option<AddressLease>, ) -> TestContext<R>
pub async fn add_actor<A>(
&self,
actor_address: Address,
address_lease: Option<AddressLease>,
actor: A,
) -> Result<&Self, RuntimeError>where
R: Send + 'static,
A: for<'a> ActorFn<'a, R>,
pub async fn with_actor<A>(
self,
actor_address: Address,
address_lease: Option<AddressLease>,
actor: A,
) -> Result<Self, RuntimeError>where
R: Send + 'static,
A: for<'a> ActorFn<'a, R>,
pub async fn add_task<F>( &self, task_key: TaskKey, address_lease: Option<AddressLease>, fut: F, ) -> Result<(), RuntimeError>
pub async fn expect_next_event(&self) -> Event<R, EventKind<R>>
pub async fn next_event( &self, ) -> Result<Option<Event<R, EventKind<R>>>, RuntimeError>
Trait Implementations§
Source§impl<R: Clone> Clone for TestRuntime<R>
impl<R: Clone> Clone for TestRuntime<R>
Source§fn clone(&self) -> TestRuntime<R>
fn clone(&self) -> TestRuntime<R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<R: Debug> Debug for TestRuntime<R>
impl<R: Debug> Debug for TestRuntime<R>
Auto Trait Implementations§
impl<R> Freeze for TestRuntime<R>
impl<R> !RefUnwindSafe for TestRuntime<R>
impl<R> Send for TestRuntime<R>where
R: Send,
impl<R> Sync for TestRuntime<R>where
R: Send,
impl<R> Unpin for TestRuntime<R>
impl<R> !UnwindSafe for TestRuntime<R>
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