Enum glommio::GlommioError [−][src]
pub enum GlommioError<T> { IoError(Error), EnhancedIoError { source: Error, op: &'static str, path: Option<PathBuf>, fd: Option<RawFd>, }, ExecutorError(ExecutorErrorKind), Closed(ResourceType<T>), WouldBlock(ResourceType<T>), ReactorError(ReactorErrorKind), TimedOut(Duration), }
Composite error type to encompass all error types glommio produces.
Single error type that will be produced by any public Glommio API
functions. Contains a generic type that is only used for the Channel
variants. In other cases it can just be replaced
with the unit type ()
and ignored. The variants are broken up into a few
common categories such as Closed
and
WouldBlock
as well as a generic
IoError
and errors dedicated to the executor and
reactor.
Examples
use glommio::{GlommioError, ResourceType}; fn will_error() -> Result<(), GlommioError<()>> { Err(GlommioError::WouldBlock(ResourceType::File( "Error reading a file".to_string(), )))? } assert!(will_error().is_err());
Variants
IoError(Error)
IO error from standard library functions or libraries that produce std::io::Error’s.
Enhanced IO error that gives more information in the error message
than the basic IoError
. It includes the
operation, path and file descriptor. It also contains the error
from the source IO error from std::io::*
.
Show fields
Executor error variant(s) for signaling certain error conditions inside of the executor.
Closed(ResourceType<T>)
The resource in question is closed. Generic because the channel variant needs to return the actual item sent into the channel.
WouldBlock(ResourceType<T>)
Error encapsulating the WouldBlock
error for types that don’t have
errors originating in the standard library. Glommio also has
nonblocking types that need to indicate if they are blocking or not.
This type allows for signaling when a function would otherwise block
for a specific ResourceType
.
Reactor error variants. This includes errors specific to the operation of the io-uring instances or related.
TimedOut(Duration)
Timeout variant used for reporting timed out operations
Implementations
impl<T> GlommioError<T>
[src]
impl<T> GlommioError<T>
[src]Trait Implementations
impl<T> Error for GlommioError<T>
[src]
impl<T> Error for GlommioError<T>
[src]impl<T> From<(Error, ResourceType<T>)> for GlommioError<T>
[src]
impl<T> From<(Error, ResourceType<T>)> for GlommioError<T>
[src]Auto Trait Implementations
impl<T> !RefUnwindSafe for GlommioError<T>
impl<T> !RefUnwindSafe for GlommioError<T>
impl<T> Send for GlommioError<T> where
T: Send,
impl<T> Send for GlommioError<T> where
T: Send,
impl<T> Sync for GlommioError<T> where
T: Sync,
impl<T> Sync for GlommioError<T> where
T: Sync,
impl<T> Unpin for GlommioError<T> where
T: Unpin,
impl<T> Unpin for GlommioError<T> where
T: Unpin,
impl<T> !UnwindSafe for GlommioError<T>
impl<T> !UnwindSafe for GlommioError<T>