pub struct AesGcmHandle<'t> { /* private fields */ }unstable only.Expand description
The handle to a pending AES-GCM operation.
Dropping it before the operation completes cancels the operation.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Implementations§
Source§impl AesGcmHandle<'_>
impl AesGcmHandle<'_>
Sourcepub fn poll(&mut self) -> bool
pub fn poll(&mut self) -> bool
Polls the operation. Returns whether it has completed.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn wait_blocking(self) -> Result<(), GcmError>
pub fn wait_blocking(self) -> Result<(), GcmError>
Polls the operation to completion, by busy-looping, and returns its result.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub async fn wait(&mut self) -> Result<(), GcmError>
pub async fn wait(&mut self) -> Result<(), GcmError>
Waits until the operation completes, and returns its result.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Sourcepub fn cancel(&mut self) -> impl Future<Output = ()>
pub fn cancel(&mut self) -> impl Future<Output = ()>
Cancels the operation, and waits until it leaves the work queue.
An operation that has not started ends with GcmError::Cancelled. One that the backend
has started runs to completion, because the hardware cannot stop part way, and keeps its
result. Self::wait or Self::wait_blocking then returns the result.
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.