pub enum RosterSource {
Registry,
FsOnly,
}Expand description
Which source produced a ProjectRoster (issue #3435, code-critic PR
#3439 review, HIGH 2).
Why: the #3363 lesson — “nothing registered” and “the registry was
unreachable” are different operator-facing situations and must not
collapse into the same-looking empty/all-unregistered roster. A bare
bool would work, but a named enum reads at the call site
(source == RosterSource::FsOnly) without a comment explaining which
state true/false means, and its serde rendering ("registry" /
"fs_only") is self-describing on the wire too.
What: Self::Registry means the mpm daemon was reached and entries
is the registry-primary/fs-secondary merge (see super::mpm_registry);
Self::FsOnly means the registry was never reached (unreachable
daemon, or not yet queried) and entries is the bare filesystem scan,
every candidate registered: false.
Test: super::mpm_registry::tests::merged_roster_with_uses_registry_when_daemon_reachable,
super::mpm_registry::tests::merged_roster_with_degrades_to_fs_only_when_daemon_unreachable.
Variants§
Registry
The mpm registry was reached; entries is the registry-primary merge.
FsOnly
The mpm registry was unreachable (or never queried); entries is the
filesystem scan alone.
Trait Implementations§
Source§impl Clone for RosterSource
impl Clone for RosterSource
impl Copy for RosterSource
Source§impl Debug for RosterSource
impl Debug for RosterSource
Source§impl Default for RosterSource
impl Default for RosterSource
impl Eq for RosterSource
Source§impl PartialEq for RosterSource
impl PartialEq for RosterSource
Source§impl Serialize for RosterSource
impl Serialize for RosterSource
impl StructuralPartialEq for RosterSource
Auto Trait Implementations§
impl Freeze for RosterSource
impl RefUnwindSafe for RosterSource
impl Send for RosterSource
impl Sync for RosterSource
impl Unpin for RosterSource
impl UnsafeUnpin for RosterSource
impl UnwindSafe for RosterSource
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,
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
key and return true if they are equal.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