pub enum SecretScope {
Machine,
User,
}Expand description
Which of the two stores a value lives in.
Not a preference and not a tuning knob: it is a direct function of the
service’s start mode, because a service that starts at boot has no login
session to read a user-scoped store from. SecretScope::for_start_mode
is that function, and it is total in both directions —
SecretScope::start_mode is its inverse, which is what lets
ActiveStore state whether the store in use agrees with the start mode
actually configured.
Variants§
Machine
Readable by a service running at machine boot, outside any login
session. The default, and what --start-at boot requires.
User
Readable only inside the operator’s login session. What
--start-at login gets, at the cost of no unattended restart.
Implementations§
Source§impl SecretScope
impl SecretScope
Sourcepub const fn for_start_mode(mode: StartMode) -> Self
pub const fn for_start_mode(mode: StartMode) -> Self
The store a given start mode obliges.
Sourcepub const fn start_mode(self) -> StartMode
pub const fn start_mode(self) -> StartMode
The start mode this store is the one correct choice for.
Trait Implementations§
Source§impl Clone for SecretScope
impl Clone for SecretScope
Source§fn clone(&self) -> SecretScope
fn clone(&self) -> SecretScope
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more