crossio-core 0.1.0

Core abstractions for the crossio async I/O backend
Documentation
//! Error types surfaced by the crossio core crate.
use std::io;

/// Unified error returned by core APIs regardless of backend.
#[derive(Debug, thiserror::Error)]
pub enum CrossioError {
    /// Configuration supplied to the backend was invalid.
    #[error("invalid backend configuration: {0}")]
    InvalidConfig(&'static str),

    /// The backend failed to initialize because the platform feature is unavailable.
    #[error("backend unavailable: {0}")]
    BackendUnavailable(&'static str),

    /// The backend could not register more sources because it reached a limit.
    #[error("resource limit reached")]
    ResourceLimit,

    /// Wrapper around [`std::io::Error`] so syscall failures can bubble up directly.
    #[error(transparent)]
    Io(#[from] io::Error),
}