pub struct AsyncRequest<'a> { /* private fields */ }Expand description
A request that runs as a future: Request for async code.
The future can be polled by any executor, or none in particular: the
sockets and timers of the call belong to the ORB’s runtime. It does not
block the thread that polls it, except that a call to an object of the
ORB’s own server side runs the servant on an upcall thread and waits
for it without blocking. The timeout is taken when
invoke is called, so a timeout of the calling
thread (set_thread_call_timeout)
counts as it does for Request.
Implementations§
Source§impl<'a> AsyncRequest<'a>
impl<'a> AsyncRequest<'a>
Sourcepub fn args<F>(self, f: F) -> AsyncRequest<'a>
pub fn args<F>(self, f: F) -> AsyncRequest<'a>
Request::args; the function must be Send and Sync, as the
future may move between threads.
Sourcepub fn timeout(self, timeout: Option<Duration>) -> AsyncRequest<'a>
pub fn timeout(self, timeout: Option<Duration>) -> AsyncRequest<'a>
Sourcepub fn invoke(
self,
) -> impl Future<Output = Result<Reply, Exception>> + Send + 'a
pub fn invoke( self, ) -> impl Future<Output = Result<Reply, Exception>> + Send + 'a
Sends the request; the future resolves to the reply.
Sourcepub fn send_oneway(
self,
) -> impl Future<Output = Result<(), SystemException>> + Send + 'a
pub fn send_oneway( self, ) -> impl Future<Output = Result<(), SystemException>> + Send + 'a
Sends the request as a oneway call; the future resolves once the message is written.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for AsyncRequest<'a>
impl<'a> !UnwindSafe for AsyncRequest<'a>
impl<'a> Forget for AsyncRequest<'a>
impl<'a> Freeze for AsyncRequest<'a>
impl<'a> Send for AsyncRequest<'a>
impl<'a> Sync for AsyncRequest<'a>
impl<'a> Unpin for AsyncRequest<'a>
impl<'a> UnsafeUnpin for AsyncRequest<'a>
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