axum_gate/
access_hierarchy.rs

1/// Defines a hierarchy with the possibility to define a supervisor and a subordinate.
2/// You can implement this either for your roles or groups if you give supervisors access to
3/// routes that have a subordinate role attached.
4pub trait AccessHierarchy
5where
6    Self: Copy,
7{
8    /// Returns the role that is one level above `self`.
9    fn supervisor(&self) -> Option<Self>;
10    /// Returns the role one level below `self`.
11    fn subordinate(&self) -> Option<Self>;
12}