Trait rsevents::AwaitableError
source · [−]pub trait AwaitableError: Error {
type UnboundedError: Error;
}
Expand description
Denotes the error returned by an Awaitable
object for its various wait calls, separating
between internal errors preventing the wait from succeeding (e.g. a poison error) and errors due
only to a timeout.
Types implementing Awaitable<T = (), Error = TimeoutError>
unlock a much simpler Awaitable
api for end users, that omits error handling and replaces timeout errors with boolean results.
Required Associated Types
sourcetype UnboundedError: Error
type UnboundedError: Error
The error type that may result from a call to an unbounded Awaitable::try_wait()
call
(i.e. excluding any timeout errors).
Using std::convert::Infallible
here will unlock a simpler Awaitable
API for end users,
with an infallible Awaitable::wait()
becoming available. Typically use Self
otherwise
to denote that wait()
and wait_for()
return the same error type.
It is recommended - but not required - to implement or otherwise satisfy the constraint
From<E::UnboundedError>
for E
where E
implements AwaitableError
.