pub enum Elevation {
Direct,
Sudo,
Skip(String),
}Expand description
What to do about elevation on Linux when we want to run kopia.
Variants§
Direct
Run as the current user — either we’re already the kopia user, or there’s no system kopia install (the operator’s running their own).
Sudo
Wrap the kopia invocation in sudo -u kopia --. Used whenever we’re
running as a different user and the system kopia install exists; if
sudo isn’t allowed (no NOPASSWD rule, no TTY), the resulting kopia
invocation will fail and the caller surfaces that as a Skip.
Skip(String)
We can’t elevate. The caller should bail with a reason.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Elevation
impl RefUnwindSafe for Elevation
impl Send for Elevation
impl Sync for Elevation
impl Unpin for Elevation
impl UnsafeUnpin for Elevation
impl UnwindSafe for Elevation
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