pub struct TransformOutput {
pub content: String,
pub truncated: bool,
pub total_count: Option<usize>,
pub included_count: usize,
pub agent_hint: Option<String>,
pub page_cursor: Option<String>,
pub page_index: Option<PageIndex>,
pub provider_pagination: Option<Pagination>,
pub provider_sort: Option<SortInfo>,
pub raw_chars: usize,
pub output_chars: usize,
pub pre_trim_chars: usize,
}Expand description
Output from a pipeline transformation.
Contains the transformed data and metadata about truncation/pagination.
Fields§
§content: StringThe transformed output (TOON or JSON string)
truncated: boolWhether the output was truncated
total_count: Option<usize>Total count before truncation (if known)
included_count: usizeNumber of items actually included
agent_hint: Option<String>Hint for the agent about hidden content
page_cursor: Option<String>Cursor for fetching the next page (if overflow exists)
page_index: Option<PageIndex>Page index for large results (when budget trimming is applied)
provider_pagination: Option<Pagination>Provider-level pagination metadata
provider_sort: Option<SortInfo>Provider-level sort metadata
raw_chars: usizeSize of raw input data before formatting (UTF-8 bytes)
output_chars: usizeSize of formatted output (UTF-8 bytes) — updated after apply_char_limit
pre_trim_chars: usizeSize of output BEFORE budget trimming (UTF-8 bytes). Set by apply_char_limit when truncation occurs.
Implementations§
Source§impl TransformOutput
impl TransformOutput
Sourcepub fn with_raw_chars(self, raw_chars: usize) -> Self
pub fn with_raw_chars(self, raw_chars: usize) -> Self
Set raw input size (before formatting).
Sourcepub fn with_truncation(
self,
total: usize,
included: usize,
hint: String,
) -> Self
pub fn with_truncation( self, total: usize, included: usize, hint: String, ) -> Self
Mark output as truncated with a hint.
Sourcepub fn to_string_with_hints(&self) -> String
pub fn to_string_with_hints(&self) -> String
Get the final output including page index and agent hints.
Trait Implementations§
Source§impl Clone for TransformOutput
impl Clone for TransformOutput
Source§fn clone(&self) -> TransformOutput
fn clone(&self) -> TransformOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more