taskflow-rs 0.1.1

A high-performance, async-first task orchestration framework for Rust
Documentation
use thiserror::Error;

#[derive(Error, Debug)]
pub enum TaskFlowError {
    #[error("Task execution failed: {0}")]
    ExecutionError(String),

    #[error("Task not found: {0}")]
    TaskNotFound(String),

    #[error("Scheduler error: {0}")]
    SchedulerError(String),

    #[error("Storage error: {0}")]
    StorageError(String),

    #[error("Serialization error: {0}")]
    SerializationError(#[from] serde_json::Error),

    #[error("HTTP error: {0}")]
    HttpError(#[from] reqwest::Error),

    #[error("Invalid task configuration: {0}")]
    InvalidConfiguration(String),

    #[error("Timeout error: task execution exceeded time limit")]
    TimeoutError,

    #[error("Retry limit exceeded for task: {0}")]
    RetryLimitExceeded(String),

    #[error("Unsupported feature: {0}")]
    UnsupportedFeature(String),

    #[error("Configuration error: {0}")]
    ConfigError(String),
}

pub type Result<T> = std::result::Result<T, TaskFlowError>;