pub struct ResourceListView {
pub items: Vec<ResourceSummary>,
pub total: usize,
pub filter: Option<String>,
pub resource_type: String,
pub pagination: ResourceListPagination,
}Expand description
The data a renderer needs to render a resource list result.
items is the post-filter list; total is the pre-filter count (capture
BEFORE applying --filter, mirroring project list); filter is the
applied substring (if any). resource_type carries the resolved class name
for the prose header. pagination carries the D5 mode struct (single page
vs. all pages).
Clone is required because the test RecordingRenderer stores the view in
an Option<ResourceListView>.
Fields§
§items: Vec<ResourceSummary>Post-filter, sorted resource summaries.
total: usizePre-filter total count. Feeds the “(m of total matching “…”)“ prose line.
filter: Option<String>The --filter substring the user supplied, if any.
resource_type: StringLocal name of the resource type, for the prose header.
pagination: ResourceListPaginationPagination state (single page vs. all-pages drain).
Trait Implementations§
Source§impl Clone for ResourceListView
impl Clone for ResourceListView
Source§fn clone(&self) -> ResourceListView
fn clone(&self) -> ResourceListView
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 moreAuto Trait Implementations§
impl Freeze for ResourceListView
impl RefUnwindSafe for ResourceListView
impl Send for ResourceListView
impl Sync for ResourceListView
impl Unpin for ResourceListView
impl UnsafeUnpin for ResourceListView
impl UnwindSafe for ResourceListView
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