pub enum RolesFilter {
Bool(bool),
Config {
provider: Option<String>,
include: Option<Vec<String>>,
exclude: Option<Vec<String>>,
},
}Expand description
Roles filter configuration
Can be either a boolean (true = include all, false = exclude all) or a detailed configuration with provider/include/exclude lists.
Variants§
Bool(bool)
Simple boolean: true = include all user roles, false = exclude all
Config
Detailed configuration
Implementations§
Source§impl RolesFilter
impl RolesFilter
Sourcepub const fn is_enabled(&self) -> bool
pub const fn is_enabled(&self) -> bool
Check if roles should be included at all
Sourcepub fn should_include(&self, role_name: &str) -> bool
pub fn should_include(&self, role_name: &str) -> bool
Check if a specific role should be included
Trait Implementations§
Source§impl Clone for RolesFilter
impl Clone for RolesFilter
Source§fn clone(&self) -> RolesFilter
fn clone(&self) -> RolesFilter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RolesFilter
impl Debug for RolesFilter
Source§impl Default for RolesFilter
impl Default for RolesFilter
Source§impl<'de> Deserialize<'de> for RolesFilter
impl<'de> Deserialize<'de> for RolesFilter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for RolesFilter
impl JsonSchema for RolesFilter
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for RolesFilter
impl RefUnwindSafe for RolesFilter
impl Send for RolesFilter
impl Sync for RolesFilter
impl Unpin for RolesFilter
impl UnsafeUnpin for RolesFilter
impl UnwindSafe for RolesFilter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more