pub type Result<T> = Result<T, Error>;Expand description
Result type alias using our comprehensive Error type.
This provides a convenient way to return results from functions that can fail with any of the layer-specific errors defined in this module.
§Examples
use axum_gate::errors::{Result, Error, PermissionsError};
fn validate_account(user_id: &str) -> Result<()> {
if user_id.is_empty() {
return Err(Error::Permissions(PermissionsError::collision(
12345,
vec!["invalid".to_string()]
)));
}
Ok(())
}Aliased Type§
pub enum Result<T> {
Ok(T),
Err(Error),
}