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§
- Common
Error - Common error type for ecosystem projects.
Traits§
- Result
Ext - Extension trait for Result types.
Type Aliases§
- Common
Result - Result type alias using
CommonError.