pub struct PendingRun { /* private fields */ }Expand description
An accepted request. Dropping it cancels work that has not entered MNN. Cancellation does not interrupt an active native call.
Implementations§
Source§impl PendingRun
impl PendingRun
Sourcepub fn wait(self) -> Result<InferenceOutput>
pub fn wait(self) -> Result<InferenceOutput>
Sourcepub fn wait_timeout(self, timeout: Duration) -> Result<InferenceOutput>
pub fn wait_timeout(self, timeout: Duration) -> Result<InferenceOutput>
Wait at most timeout; expiry also cancels work that has not started.
§Errors
Returns DeadlineExceeded on timeout, or an inference/worker error.
Trait Implementations§
Source§impl Debug for PendingRun
impl Debug for PendingRun
Source§impl Drop for PendingRun
impl Drop for PendingRun
Auto Trait Implementations§
impl !Sync for PendingRun
impl Freeze for PendingRun
impl RefUnwindSafe for PendingRun
impl Send for PendingRun
impl Unpin for PendingRun
impl UnsafeUnpin for PendingRun
impl UnwindSafe for PendingRun
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