pub struct CollapseArraysStage;Expand description
For JSON content, cap arrays that are both long and large. An array with
more than max_items elements whose compact JSON is over max_chars
keeps leading elements up to max_chars (never fewer than max_items)
and ends with a summary string element. Smaller arrays stay whole, so a
search result or a page of records keeps every entry.
Config options:
max_items(u32, default 5)max_chars(u32, default 32000; 0 caps onmax_itemsalone)summary_template(string, default “… and {remaining} more items”) Non-JSON content passes through unchanged.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CollapseArraysStage
impl RefUnwindSafe for CollapseArraysStage
impl Send for CollapseArraysStage
impl Sync for CollapseArraysStage
impl Unpin for CollapseArraysStage
impl UnsafeUnpin for CollapseArraysStage
impl UnwindSafe for CollapseArraysStage
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