Skip to main content

Module error

Module error 

Source
Available on crate feature error only.
Expand description

Common error types and handling utilities.

This module provides a unified error type for use across ecosystem projects, along with convenient Result type aliases.

§Example

use commons::error::{CommonError, CommonResult};

fn process_data(input: &str) -> CommonResult<String> {
    if input.is_empty() {
        return Err(CommonError::InvalidInput("Input cannot be empty".into()));
    }
    Ok(input.to_uppercase())
}

Enums§

CommonError
Common error type for ecosystem projects.

Traits§

ResultExt
Extension trait for Result types.

Type Aliases§

CommonResult
Result type alias using CommonError.