pub enum Actor {
Daemon,
Watchdog,
User {
uid: u32,
session: Option<String>,
seat: Option<String>,
active: bool,
},
Model(ModelId),
Agent(PrincipalId),
Unattributed,
}Variants§
Daemon
Watchdog
User
Filled from SO_PEERCRED → pid → logind (§10). session is None only
for callers outside any logind session (a root timer), which never
satisfy an “own session” floor; seat is None for SSH and other remote
sessions, which are never local.
Model(ModelId)
Agent(PrincipalId)
Reserved: remote principals via a relay; in Phase A, only a local agent the journal has no start for (it holds nothing; §11).
Unattributed
The actor of an Inferred override (§11): never a caller, never authorized.
Implementations§
Source§impl Actor
impl Actor
Sourcepub fn user(uid: u32) -> Actor
pub fn user(uid: u32) -> Actor
A user outside any logind session (a root timer, a test). Never local, never “own session”.
Sourcepub fn local(uid: u32, session: &str) -> Actor
pub fn local(uid: u32, session: &str) -> Actor
A user in the active local session session on seat0.
Sourcepub fn principal(&self) -> PrincipalId
pub fn principal(&self) -> PrincipalId
The principal behind this actor (§11). A human is their uid; the non-human actors of Phase A have fixed ids above every uid.
pub fn uid(&self) -> Option<u32>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Actor
impl<'de> Deserialize<'de> for Actor
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 Ord for Actor
impl Ord for Actor
Source§impl PartialOrd for Actor
impl PartialOrd for Actor
impl Eq for Actor
impl StructuralPartialEq for Actor
Auto Trait Implementations§
impl Freeze for Actor
impl RefUnwindSafe for Actor
impl Send for Actor
impl Sync for Actor
impl Unpin for Actor
impl UnsafeUnpin for Actor
impl UnwindSafe for Actor
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