pub struct PrincipalId(/* private fields */);Expand description
Opaque principal identifier. Flexible string storage: UUID strings for User principals, static service names for System/Service.
Implementations§
Source§impl PrincipalId
impl PrincipalId
Sourcepub const fn static_str(s: &'static str) -> Self
pub const fn static_str(s: &'static str) -> Self
Wrap a &'static str — for compile-time system/service names.
Sourcepub fn from_owned(s: String) -> Self
pub fn from_owned(s: String) -> Self
Wrap an owned String — for DB round-trips and dynamic construction.
Trait Implementations§
Source§impl Clone for PrincipalId
impl Clone for PrincipalId
Source§fn clone(&self) -> PrincipalId
fn clone(&self) -> PrincipalId
Returns a duplicate of the value. Read more
1.0.0 · 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 PrincipalId
impl Debug for PrincipalId
Source§impl<'de> Deserialize<'de> for PrincipalId
impl<'de> Deserialize<'de> for PrincipalId
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 Display for PrincipalId
impl Display for PrincipalId
Source§impl Hash for PrincipalId
impl Hash for PrincipalId
Source§impl PartialEq for PrincipalId
impl PartialEq for PrincipalId
Source§impl Serialize for PrincipalId
impl Serialize for PrincipalId
impl Eq for PrincipalId
impl StructuralPartialEq for PrincipalId
Auto Trait Implementations§
impl Freeze for PrincipalId
impl RefUnwindSafe for PrincipalId
impl Send for PrincipalId
impl Sync for PrincipalId
impl Unpin for PrincipalId
impl UnsafeUnpin for PrincipalId
impl UnwindSafe for PrincipalId
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ValidateIp for Twhere
T: ToString,
impl<T> ValidateIp for Twhere
T: ToString,
Source§fn validate_ipv4(&self) -> bool
fn validate_ipv4(&self) -> bool
Validates whether the given string is an IP V4
Source§fn validate_ipv6(&self) -> bool
fn validate_ipv6(&self) -> bool
Validates whether the given string is an IP V6
Source§fn validate_ip(&self) -> bool
fn validate_ip(&self) -> bool
Validates whether the given string is an IP