pub struct ProjectRoster {
pub entries: Vec<ProjectCandidate>,
pub source: RosterSource,
}Expand description
The fs.list_projects response body — everything the picker needs for
one render.
Why: a bare Vec<ProjectCandidate> would work equally well over the
wire, but wrapping it in a named struct (mirroring super::DirListing)
leaves room to add roster-level metadata later (e.g. a truncated: bool
flag) without a breaking wire-shape change — source (issue #3435) is
exactly that: an additive field a client predating it can simply ignore.
Test: tests::empty_home_returns_empty_roster.
Fields§
§entries: Vec<ProjectCandidate>Candidate projects, sorted case-insensitively by name, capped at
[MAX_ENTRIES].
source: RosterSourceWhich source produced entries (issue #3435). A bare filesystem scan
(this module’s own list_projects/[list_projects_in]) always
reports RosterSource::FsOnly — only super::mpm_registry::merge
reports RosterSource::Registry, on a successful registry fetch.
Trait Implementations§
Source§impl Clone for ProjectRoster
impl Clone for ProjectRoster
Source§fn clone(&self) -> ProjectRoster
fn clone(&self) -> ProjectRoster
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProjectRoster
impl Debug for ProjectRoster
Source§impl Default for ProjectRoster
impl Default for ProjectRoster
Source§fn default() -> ProjectRoster
fn default() -> ProjectRoster
impl Eq for ProjectRoster
Source§impl PartialEq for ProjectRoster
impl PartialEq for ProjectRoster
Source§impl Serialize for ProjectRoster
impl Serialize for ProjectRoster
impl StructuralPartialEq for ProjectRoster
Auto Trait Implementations§
impl Freeze for ProjectRoster
impl RefUnwindSafe for ProjectRoster
impl Send for ProjectRoster
impl Sync for ProjectRoster
impl Unpin for ProjectRoster
impl UnsafeUnpin for ProjectRoster
impl UnwindSafe for ProjectRoster
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