pub struct RoleName(/* private fields */);Expand description
IdP-issued role name within a realm/tenant.
AUTHZ-CORE-3/4 will own this type in the long run; this ticket introduces
it here for the audit record’s roles: Vec<RoleName> field. When the
canonical type lands in plexus-auth-core::capabilities, this re-exports
from there. The strong-typing discipline survives the move.
Implementations§
Source§impl RoleName
impl RoleName
Sourcepub fn try_new(s: impl Into<String>) -> Result<Self, RoleNameError>
pub fn try_new(s: impl Into<String>) -> Result<Self, RoleNameError>
Construct a RoleName, validating the [a-z][a-z0-9_]* grammar.
Per AUTHZ-CORE-4. The pre-existing unvalidated RoleName::new
constructor remains for wire-decoded values (token claims); registry
construction goes through this validating path.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RoleName
impl<'de> Deserialize<'de> for RoleName
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
impl Eq for RoleName
Source§impl Ord for RoleName
impl Ord for RoleName
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for RoleName
impl PartialOrd for RoleName
impl StructuralPartialEq for RoleName
Auto Trait Implementations§
impl Freeze for RoleName
impl RefUnwindSafe for RoleName
impl Send for RoleName
impl Sync for RoleName
impl Unpin for RoleName
impl UnsafeUnpin for RoleName
impl UnwindSafe for RoleName
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