pub struct SupervisorPrincipal { /* private fields */ }Expand description
Somebody who may ask a question without holding a seat at the table.
A supervisor route exists because the person watching a ceremony is often not playing in it, and making them take a role in order to ask would hand them every action that role has. Authority to ask is not authority to mutate: this type carries the asker’s identity and nothing else, and closing the item it opens stays with the item’s requester, which is the synthetic role derived from this principal.
Implementations§
Source§impl SupervisorPrincipal
impl SupervisorPrincipal
pub const fn new( principal_id: AuditActorId, display: SupervisorDisplayName, ) -> Self
pub const fn principal_id(&self) -> &AuditActorId
pub const fn display(&self) -> &SupervisorDisplayName
Sourcepub fn requesting_role(&self) -> Result<RoleId, DomainError>
pub fn requesting_role(&self) -> Result<RoleId, DomainError>
The seat this principal asks under.
Derived rather than chosen, so a supervisor can never spell a role the definition declares and inherit what that role may do. The prefix is what tells a reader of the journal that the asker was outside the table.
Trait Implementations§
Source§impl Clone for SupervisorPrincipal
impl Clone for SupervisorPrincipal
Source§impl Debug for SupervisorPrincipal
impl Debug for SupervisorPrincipal
Source§impl<'de> Deserialize<'de> for SupervisorPrincipal
impl<'de> Deserialize<'de> for SupervisorPrincipal
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 SupervisorPrincipal
Source§impl PartialEq for SupervisorPrincipal
impl PartialEq for SupervisorPrincipal
Source§impl Serialize for SupervisorPrincipal
impl Serialize for SupervisorPrincipal
impl StructuralPartialEq for SupervisorPrincipal
Auto Trait Implementations§
impl Freeze for SupervisorPrincipal
impl RefUnwindSafe for SupervisorPrincipal
impl Send for SupervisorPrincipal
impl Sync for SupervisorPrincipal
impl Unpin for SupervisorPrincipal
impl UnsafeUnpin for SupervisorPrincipal
impl UnwindSafe for SupervisorPrincipal
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