pub struct ListOptions {
pub limit: Option<usize>,
pub offset: usize,
pub include_empty: bool,
pub sort: ListSort,
}Expand description
Filter + sort + paginate options for the listing methods.
Default::default() preserves the historical zero-arg behavior:
no limit, no offset, name-ascending sort, and include_empty = true (everything is returned). Callers wanting paginated
or filtered output – the typical case for the new _with
methods – override the relevant fields explicitly.
Fields§
§limit: Option<usize>Max items to return after sorting + offset. None = no cap.
offset: usizeSkip the first N items after sorting. Used with limit for
pagination. 0 means “start from the first item.”
include_empty: boolWhen false, drop entries with no real activity – for
projects, session_count == 0; for sessions, message_count == 0 (the orphan stub files Claude Code sometimes leaves
behind when a session never produced a turn). Default true
so the zero-arg HistoryRoot::list_projects /
HistoryRoot::list_sessions methods preserve their
pre-pagination “include everything” behavior. New paginated
callers (e.g. an MCP tool layer) should set this to false
to hide orphan stub sessions and empty project directories.
sort: ListSortSort order. See ListSort.
Trait Implementations§
Source§impl Clone for ListOptions
impl Clone for ListOptions
Source§fn clone(&self) -> ListOptions
fn clone(&self) -> ListOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more