limit
Shared
--limit flag for list commands.struct LimitArgs
pub struct LimitArgsCommon --limit flag that can be flattened into any list command struct.
| Field | Type | Description |
|---|---|---|
limit |
Option<usize> | Cap the number of items returned. |
Implements FromArgMatches, Args, Clone, Debug, Default.
LimitArgs::apply
pub fn apply<T>(&self, items: &mut Vec<T>)Truncate items in place to at most limit entries when set; no-op otherwise.
| Parameter | Type | Description |
|---|---|---|
items |
&mut Vec<T> | the list to truncate |