pub struct LeaseSettings {
pub default_expiry_minutes: Option<i64>,
pub backup_dir: Option<PathBuf>,
pub biometrics_only: bool,
pub allow_headless: bool,
}Expand description
The lease section of settings.json — global, machine-wide policy for
drive lease acquire/restore.
Sibling of drive rather than nested under it (issue #1677,
ADR-0080 §13): none of these are
meaningful per-Drive-account, they describe this machine’s policy.
Every field is optional; an unset field falls back to the built-in
default, so an absent lease block preserves drive lease’s behaviour
byte-for-byte. See crate::drive::lease::settings for the resolvers that
layer a CLI flag and an env var on top of each of these.
Fields§
§default_expiry_minutes: Option<i64>Default --expiry-minutes when the flag is omitted (ADR-0080 §5/§13).
backup_dir: Option<PathBuf>Default --backup-dir when the flag is omitted (ADR-0080 §3/§13).
biometrics_only: boolDefault authentication policy: false selects device-owner (the
default), true selects biometrics-only (ADR-0080 §7/§13).
allow_headless: boolOpt-out for headless/off-macOS contexts (ADR-0080 §8/§13): true
lets drive lease acquire/restore proceed with no device-owner
authenticator, waiving the human-presence guarantee.
Trait Implementations§
Source§impl Clone for LeaseSettings
impl Clone for LeaseSettings
Source§impl Debug for LeaseSettings
impl Debug for LeaseSettings
Source§impl Default for LeaseSettings
impl Default for LeaseSettings
Source§impl<'de> Deserialize<'de> for LeaseSettings
impl<'de> Deserialize<'de> for LeaseSettings
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>,
Auto Trait Implementations§
impl Freeze for LeaseSettings
impl RefUnwindSafe for LeaseSettings
impl Send for LeaseSettings
impl Sync for LeaseSettings
impl Unpin for LeaseSettings
impl UnsafeUnpin for LeaseSettings
impl UnwindSafe for LeaseSettings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more