pub enum Error {
InvalidToken,
IoError(Error),
OtherError(Box<dyn Error + Sync + Send>),
}
Expand description
The primary error type used by Calloop covering internal errors and I/O errors that arise during loop operations such as source registration or event dispatching.
Variants§
InvalidToken
When an event source is registered (or re- or un-registered) with the event loop, this error variant will occur if the token Calloop uses to keep track of the event source is not valid.
IoError(Error)
This variant wraps a std::io::Error
, which might arise from
Calloop’s internal operations.
OtherError(Box<dyn Error + Sync + Send>)
Any other unexpected error kind (most likely from a user implementation of
EventSource::process_events()
) will be wrapped in this.
Trait Implementations§
source§impl Error for Error
impl Error for Error
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
source§impl From<Errno> for Error
impl From<Errno> for Error
source§fn from(err: Errno) -> Self
fn from(err: Errno) -> Self
Converts a nix::Error
into a wrapped version of the equivalent
std::io::Error
.
source§impl From<Error> for Error
impl From<Error> for Error
source§fn from(err: Error) -> Self
fn from(err: Error) -> Self
Converts Calloop’s error type into a std::io::Error
.
source§impl<T> From<InsertError<T>> for Error
impl<T> From<InsertError<T>> for Error
source§fn from(e: InsertError<T>) -> Error
fn from(e: InsertError<T>) -> Error
Converts the InsertError
into Calloop’s error type, throwing away
the contained source.