pub struct RoleRegistry { /* private fields */ }Expand description
Registry for managing role validators
Implementations§
Source§impl RoleRegistry
impl RoleRegistry
Sourcepub fn with_builtin_validators() -> Self
pub fn with_builtin_validators() -> Self
Creates a registry with built-in validators
Sourcepub fn register_validator(&mut self, validator: Box<dyn RoleValidator>)
pub fn register_validator(&mut self, validator: Box<dyn RoleValidator>)
Registers a role validator
Sourcepub fn register_builtin_validators(&mut self)
pub fn register_builtin_validators(&mut self)
Registers all built-in validators
Sourcepub fn validate_role(&self, role: &ParsedRole) -> RoleValidationResult
pub fn validate_role(&self, role: &ParsedRole) -> RoleValidationResult
Validates a role
Sourcepub fn get_role_suggestions(&self, role: &ParsedRole) -> Vec<String>
pub fn get_role_suggestions(&self, role: &ParsedRole) -> Vec<String>
Gets suggestions for a role
Sourcepub fn get_registered_roles(&self) -> Vec<String>
pub fn get_registered_roles(&self) -> Vec<String>
Returns all registered role names
Sourcepub fn is_role_registered(&self, name: &str) -> bool
pub fn is_role_registered(&self, name: &str) -> bool
Checks if a role is registered
Trait Implementations§
Source§impl Default for RoleRegistry
impl Default for RoleRegistry
Source§fn default() -> RoleRegistry
fn default() -> RoleRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RoleRegistry
impl !RefUnwindSafe for RoleRegistry
impl Send for RoleRegistry
impl Sync for RoleRegistry
impl Unpin for RoleRegistry
impl !UnwindSafe for RoleRegistry
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more