#[non_exhaustive]pub enum CancelQueryError {
QueryNotFound(QueryHandle),
}alloc or no-atomic or std only.Expand description
Errors raised by query-handle lookups on Endpoint (poll_query_*,
handle_query_timeout, cancel_query, …) when the handle no longer
corresponds to an active query. A query disappears from the endpoint
when its terminal update has been drained via Endpoint::poll_query
(auto-prune) or after an explicit Endpoint::cancel_query call.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
QueryNotFound(QueryHandle)
The handle does not refer to a currently registered query.
Implementations§
Source§impl CancelQueryError
impl CancelQueryError
Sourcepub const fn is_query_not_found(&self) -> bool
pub const fn is_query_not_found(&self) -> bool
Returns true if this value is of type QueryNotFound. Returns false otherwise
Source§impl CancelQueryError
impl CancelQueryError
Sourcepub fn unwrap_query_not_found(self) -> QueryHandle
pub fn unwrap_query_not_found(self) -> QueryHandle
Unwraps this value to the CancelQueryError::QueryNotFound variant.
Panics if this value is of any other type.
Sourcepub fn unwrap_query_not_found_ref(&self) -> &QueryHandle
pub fn unwrap_query_not_found_ref(&self) -> &QueryHandle
Unwraps this reference to the CancelQueryError::QueryNotFound variant.
Panics if this value is of any other type.
Source§impl CancelQueryError
impl CancelQueryError
Sourcepub fn try_unwrap_query_not_found(
self,
) -> Result<QueryHandle, TryUnwrapError<Self>>
pub fn try_unwrap_query_not_found( self, ) -> Result<QueryHandle, TryUnwrapError<Self>>
Attempts to unwrap this value to the CancelQueryError::QueryNotFound variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Sourcepub fn try_unwrap_query_not_found_ref(
&self,
) -> Result<&QueryHandle, TryUnwrapError<&Self>>
pub fn try_unwrap_query_not_found_ref( &self, ) -> Result<&QueryHandle, TryUnwrapError<&Self>>
Attempts to unwrap this reference to the CancelQueryError::QueryNotFound variant.
Returns a [TryUnwrapError] with the original value if this value is of any other type.
Trait Implementations§
Source§impl Clone for CancelQueryError
impl Clone for CancelQueryError
Source§fn clone(&self) -> CancelQueryError
fn clone(&self) -> CancelQueryError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CancelQueryError
impl Debug for CancelQueryError
Source§impl Display for CancelQueryError
impl Display for CancelQueryError
Source§impl Error for CancelQueryError
impl Error for CancelQueryError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()