use crateResult;
/// Resolves the caller's role for the current HTTP request.
///
/// Implement this trait on a concrete type (for example a struct that wraps a
/// [`Database`](crate::db::Database) handle or session helper) and pass an
/// instance to [`super::middleware()`]. The `parts` argument is mutable so
/// implementations can call axum extractors such as
/// [`Session::from_request_parts`](crate::auth::session::Session) or
/// [`Bearer`](crate::auth::Bearer) internally.
///
/// This trait uses return-position `impl Trait` in traits (RPITIT) and is
/// **not** object-safe. Always use it as a generic parameter bound, never as
/// `dyn RoleExtractor` or behind `Box<dyn ...>`.