Skip to main content

Module errors

Module errors 

Source
Expand description

Shared crate-local error surface for webgates-core.

This module provides the small root error enum used by fallible helper APIs in the crate. If you need a single error type for permission validation and related core workflows, this is usually the right one to return.

The broader user-facing error contracts and severity taxonomy remain in crate::errors_core. This module simply provides a focused wrapper that keeps webgates-core APIs explicit and framework-agnostic.

§Usage

Use Error and Result when returning the crate’s shared error type from core helpers:

use webgates_core::errors::{Error, Result};
use webgates_core::permissions::errors::PermissionsError;

fn validate(flag: bool) -> Result<()> {
    if flag {
        Ok(())
    } else {
        Err(Error::Permissions(PermissionsError::collision(
            42,
            vec!["read:alpha".to_string(), "read:beta".to_string()],
        )))
    }
}

Enums§

Error
Root error enum for webgates-core.

Type Aliases§

Result
Result alias using Error as the crate-local error type.