pub struct Request { /* private fields */ }Expand description
An owned non-blocking streaming request.
A request keeps its parent Engine alive. Lifecycle methods require mutable
access, and the request is intentionally Send but not Sync.
Implementations§
Source§impl Request
impl Request
Sourcepub fn cancel(&mut self) -> Result<(), Error>
pub fn cancel(&mut self) -> Result<(), Error>
Requests cancellation.
Cancellation is idempotent. The ABI does not report whether this call
changed native state, so wait returns
RequestOutcome::Cancelled when cancellation succeeded after a false
completion probe and no terminal callback was subsequently observed. A
terminal callback wins that race unless it stops or panics.
Sourcepub fn wait(&mut self) -> Result<RequestOutcome, Error>
pub fn wait(&mut self) -> Result<RequestOutcome, Error>
Waits for callback delivery to finish and returns its terminal outcome.
Calling this from this request’s own callback returns
Error::RequestCallbackThread without entering native code.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Request
impl !Sync for Request
impl !UnwindSafe for Request
impl Freeze for Request
impl Unpin for Request
impl UnsafeUnpin for Request
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