pub struct CiDetection {
pub active: bool,
pub activation: Option<CiActivation>,
pub heuristic_signals: Vec<String>,
}Expand description
Outcome of detect_ci_mode.
Fields§
§active: booltrue iff CI mode is selected.
activation: Option<CiActivation>How CI mode was activated. None when inactive.
heuristic_signals: Vec<String>Heuristic signals (CI, GITLAB_CI, …) observed in the
environment. Reported regardless of the active state so
doctor can show “we saw CI signals, but you didn’t opt
in.”
Implementations§
Source§impl CiDetection
impl CiDetection
Sourcepub fn heuristic_without_explicit(&self) -> bool
pub fn heuristic_without_explicit(&self) -> bool
true when heuristic CI signals were observed but the user
did not opt in via any explicit trigger. Drives the
doctor notice.
Sourcepub fn doctor_notice(&self) -> Option<String>
pub fn doctor_notice(&self) -> Option<String>
Human-readable warning for doctor when heuristic signals
fire without an explicit opt-in. Returns None otherwise.
Trait Implementations§
Source§impl Clone for CiDetection
impl Clone for CiDetection
Source§fn clone(&self) -> CiDetection
fn clone(&self) -> CiDetection
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 CiDetection
impl Debug for CiDetection
impl Eq for CiDetection
Source§impl From<&CiDetection> for CiPolicy
impl From<&CiDetection> for CiPolicy
Source§fn from(d: &CiDetection) -> Self
fn from(d: &CiDetection) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CiDetection
impl PartialEq for CiDetection
Source§fn eq(&self, other: &CiDetection) -> bool
fn eq(&self, other: &CiDetection) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CiDetection
Auto Trait Implementations§
impl Freeze for CiDetection
impl RefUnwindSafe for CiDetection
impl Send for CiDetection
impl Sync for CiDetection
impl Unpin for CiDetection
impl UnsafeUnpin for CiDetection
impl UnwindSafe for CiDetection
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.