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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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