pub struct ResponseFuture { /* private fields */ }Expand description
Future that returns the inference response.
The request can be cancelled by dropping this structure.
Also the input buffers assigned to the request can be returned via get_input_release.
Implementations§
Source§impl ResponseFuture
impl ResponseFuture
Sourcepub fn blocking_recv(self) -> Result<Response, InferenceError>
pub fn blocking_recv(self) -> Result<Response, InferenceError>
Blocking await to call outside of asynchronous contexts.
§Panics
This function panics if called within an asynchronous execution context.
Sourcepub fn get_input_release(&mut self) -> InputRelease ⓘ
pub fn get_input_release(&mut self) -> InputRelease ⓘ
Get the future to return the input buffers assigned to the Request.
NOTE: this function should be called at most once. Otherwise it will return garbage.
Note that input buffer can be released in any time from the start of the inference
to the end of it.
Trait Implementations§
Source§impl Future for ResponseFuture
Awaiting on this structure will returt result of the inference: Ok(Response) or Err(InferenceError).
impl Future for ResponseFuture
Awaiting on this structure will returt result of the inference: Ok(Response) or Err(InferenceError).
Auto Trait Implementations§
impl Freeze for ResponseFuture
impl !RefUnwindSafe for ResponseFuture
impl Send for ResponseFuture
impl Sync for ResponseFuture
impl Unpin for ResponseFuture
impl !UnwindSafe for ResponseFuture
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
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more