pub struct ChunkConfig {
pub split_on: String,
pub include_split_line: bool,
pub collect_as: String,
pub extract: Option<ChunkExtract>,
pub body_extract: Vec<ChunkBodyExtract>,
pub aggregate: Vec<ChunkAggregateRule>,
pub group_by: Option<String>,
pub children_as: Option<String>,
}Expand description
Configuration for splitting output into repeating structural blocks.
Chunks split output at delimiter lines, extract structured data from each block, and collect the results as a structured collection for template rendering.
Fields§
§split_on: StringRegex that marks the start of each chunk.
include_split_line: boolWhether the splitting line is included in the chunk (default: true).
collect_as: StringVariable name for the structured collection in templates.
extract: Option<ChunkExtract>Extract a named field from the split (header) line.
body_extract: Vec<ChunkBodyExtract>Per-chunk body line extractions (first match per rule wins).
aggregate: Vec<ChunkAggregateRule>Per-chunk aggregate rules (run within each chunk’s lines).
group_by: Option<String>Field name to group chunks by (merging numeric fields).
children_as: Option<String>When set alongside group_by, preserve each group’s original items
as a nested collection under this name instead of discarding them.
Trait Implementations§
Source§impl Clone for ChunkConfig
impl Clone for ChunkConfig
Source§fn clone(&self) -> ChunkConfig
fn clone(&self) -> ChunkConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChunkConfig
impl Debug for ChunkConfig
Source§impl<'de> Deserialize<'de> for ChunkConfig
impl<'de> Deserialize<'de> for ChunkConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ChunkConfig
impl PartialEq for ChunkConfig
Source§impl Serialize for ChunkConfig
impl Serialize for ChunkConfig
impl Eq for ChunkConfig
impl StructuralPartialEq for ChunkConfig
Auto Trait Implementations§
impl Freeze for ChunkConfig
impl RefUnwindSafe for ChunkConfig
impl Send for ChunkConfig
impl Sync for ChunkConfig
impl Unpin for ChunkConfig
impl UnsafeUnpin for ChunkConfig
impl UnwindSafe for ChunkConfig
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