pub struct Proxy { /* private fields */ }Implementations
sourceimpl Proxy
impl Proxy
pub fn addr(&self) -> Addr
pub fn send<M: Message>(&self, message: M) -> impl Future<Output = ()> + '_
pub fn send_to<M: Message>(
&self,
recipient: Addr,
message: M
) -> impl Future<Output = ()> + '_
pub fn request<R: Request>(
&self,
request: R
) -> impl Future<Output = R::Response> + '_
pub fn respond<R: Request>(&self, token: ResponseToken<R>, response: R::Response)
pub fn recv(&mut self) -> impl Future<Output = Envelope> + '_
pub fn try_recv(&mut self) -> Option<Envelope>
sourcepub async fn sync(&mut self)
pub async fn sync(&mut self)
Waits until the testable actor handles all previously sent messages.
Now it’s implemented as multiple calls yield_now(),
but the implementation can be changed in the future.
pub fn set_addr(&mut self, addr: Addr)
👎Deprecated
sourcepub fn set_recv_timeout(&mut self, recv_timeout: Duration)
pub fn set_recv_timeout(&mut self, recv_timeout: Duration)
Sets message wait time for recv call.
pub fn non_exhaustive(&mut self)
sourcepub async fn subproxy(&self) -> Proxy
pub async fn subproxy(&self) -> Proxy
Creates a subproxy with a different address.
The main purpose is to test send_to(..) and request(..).from(..)
calls. It’s likely to be changed in the future.
pub async fn finished(&self)
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Proxy
impl Send for Proxy
impl !Sync for Proxy
impl Unpin for Proxy
impl !UnwindSafe for Proxy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more