pub struct AsyncWorldClient<Req, Res> { /* private fields */ }Expand description
This is a client of an async world for a sync code.
Implementations§
Source§impl<Req, Res> AsyncWorldClient<Req, Res>where
Res: Send + 'static,
impl<Req, Res> AsyncWorldClient<Req, Res>where
Res: Send + 'static,
Sourcepub fn send_request(&self, data: Req) -> Result<Res, Error>
pub fn send_request(&self, data: Req) -> Result<Res, Error>
This method sends a request, expecting a response, from a sync world into an async world.
This is a blocking call, but it should be safe to be called from a tokio context.
Trait Implementations§
Source§impl<Req: Clone, Res: Clone> Clone for AsyncWorldClient<Req, Res>
impl<Req: Clone, Res: Clone> Clone for AsyncWorldClient<Req, Res>
Source§fn clone(&self) -> AsyncWorldClient<Req, Res>
fn clone(&self) -> AsyncWorldClient<Req, Res>
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<Req, Res> Debug for AsyncWorldClient<Req, Res>
impl<Req, Res> Debug for AsyncWorldClient<Req, Res>
Source§impl<Req, Res> Hash for AsyncWorldClient<Req, Res>
impl<Req, Res> Hash for AsyncWorldClient<Req, Res>
Source§impl<Req1, Res1, Req2, Res2> PartialEq<AsyncWorldClient<Req2, Res2>> for AsyncWorldClient<Req1, Res1>
impl<Req1, Res1, Req2, Res2> PartialEq<AsyncWorldClient<Req2, Res2>> for AsyncWorldClient<Req1, Res1>
Source§fn eq(&self, other: &AsyncWorldClient<Req2, Res2>) -> bool
fn eq(&self, other: &AsyncWorldClient<Req2, Res2>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<Req, Res> Eq for AsyncWorldClient<Req, Res>
Auto Trait Implementations§
impl<Req, Res> Freeze for AsyncWorldClient<Req, Res>
impl<Req, Res> RefUnwindSafe for AsyncWorldClient<Req, Res>
impl<Req, Res> Send for AsyncWorldClient<Req, Res>
impl<Req, Res> Sync for AsyncWorldClient<Req, Res>
impl<Req, Res> Unpin for AsyncWorldClient<Req, Res>
impl<Req, Res> UnwindSafe for AsyncWorldClient<Req, Res>
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