pub struct CallbackRequest { /* private fields */ }Expand description
A request that returns at once and hands its reply to a callback: what
the sendc_ operations of AMI (docs/ami.md) are built on.
The request is sent by the ORB’s runtime, as AsyncRequest does,
and the callback runs on a thread of the ORB’s reply pool, not on the
thread that sent it nor on a tokio worker, so it may use the
synchronous API (to call a ReplyHandler, say). The timeout and the
Portable Interceptors’ request scope slots are those of the thread
that calls send.
Implementations§
Source§impl CallbackRequest
impl CallbackRequest
Sourcepub fn args<F>(self, f: F) -> CallbackRequest
pub fn args<F>(self, f: F) -> CallbackRequest
Request::args. The function owns what it writes: it runs after
send has returned, on the ORB’s runtime,
once or more (when the request is forwarded or sent again).
Sourcepub fn timeout(self, timeout: Option<Duration>) -> CallbackRequest
pub fn timeout(self, timeout: Option<Duration>) -> CallbackRequest
Sourcepub fn send<F>(self, done: F) -> Result<(), SystemException>
pub fn send<F>(self, done: F) -> Result<(), SystemException>
Sends the request without waiting for it. done gets the reply or
the exception exactly once, on a thread of the reply pool. Fails
only when the ORB is shut down (BAD_INV_ORDER), and then done
is not called.
If the ORB is destroyed or its runtime ends before the reply
arrives, done gets the exception of the failed call
(COMM_FAILURE or TRANSIENT), on the thread that ends it.