pub struct ProjectListView {
pub items: Vec<Project>,
pub total: usize,
pub filter: Option<String>,
}Expand description
The data a renderer needs to render a project list result.
total is the pre-filter count; filter is the applied substring (if any),
used only by prose for the “(m of n matching “…”)“ count line.
Owns its data (no borrow/lifetime): it is a per-call view, never stored, and
the action builds it by moving the already-sorted Vec<Project> in. Owning
avoids a 'a parameter leaking into the Renderer::projects signature (and
the latent lifetime-elision trap a future caching renderer would hit). The
clone cost is nil — the vec is moved, not copied.
Fields§
§items: Vec<Project>§total: usizePre-filter total count (before --filter was applied). Feeds the
“(m of total matching …)” prose count line.
filter: Option<String>The --filter substring the user supplied, if any.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProjectListView
impl RefUnwindSafe for ProjectListView
impl Send for ProjectListView
impl Sync for ProjectListView
impl Unpin for ProjectListView
impl UnsafeUnpin for ProjectListView
impl UnwindSafe for ProjectListView
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