pub enum ValidateOutcome {
Ok,
Invalid(String),
BinaryMissing(String),
PrivilegeDenied(String),
}Expand description
The result of validating a staged sshd_config.
Returned by the validation seam so callers (and tests) can distinguish the terminal cases without inspecting error text.
Variants§
Ok
sshd -t accepted the config.
Invalid(String)
sshd -t rejected the config; carry the diagnostic output.
BinaryMissing(String)
The sshd binary is not installed / unreachable via the privileged
path; carry the detail we observed.
PrivilegeDenied(String)
The privileged runner could not authenticate (e.g. sudo -n has no
cached credentials — “a password is required”). This is a privilege
failure, not a config error; mapped to Error::SudoFailed so the UI
does not misreport it as a config-validation failure.
Trait Implementations§
Source§impl Clone for ValidateOutcome
impl Clone for ValidateOutcome
Source§fn clone(&self) -> ValidateOutcome
fn clone(&self) -> ValidateOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValidateOutcome
impl Debug for ValidateOutcome
impl Eq for ValidateOutcome
Source§impl PartialEq for ValidateOutcome
impl PartialEq for ValidateOutcome
impl StructuralPartialEq for ValidateOutcome
Auto Trait Implementations§
impl Freeze for ValidateOutcome
impl RefUnwindSafe for ValidateOutcome
impl Send for ValidateOutcome
impl Sync for ValidateOutcome
impl Unpin for ValidateOutcome
impl UnsafeUnpin for ValidateOutcome
impl UnwindSafe for ValidateOutcome
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