pub struct TreeFlattenSpec {
pub root: Option<String>,
pub children: String,
pub leaf: String,
pub columns: ColumnsSpec,
pub ancestors: Option<AncestorsSpec>,
pub path_as: Option<String>,
pub path_sep: String,
pub drop_empty: bool,
pub emit_group_rows: bool,
pub max_depth: usize,
}transform-tree-flatten only.Expand description
Spec for the tree_flatten transform — recursive tree/matrix → leaf rows
(1→0..N). Compile with TreeFlattenSpec::compile; attach via
TreeFlattenSpec::into_stage.
Fields§
§root: Option<String>Path to the top-level node array within the record — e.g. Rows.Row.
Absent → the record itself is the single root node.
children: StringPath (within a node) to its child-node array — the recursion key, e.g.
Rows.Row.
leaf: StringLeaf detection: has_no_children (default) or has_field:<name> (a node
carrying <name> is a leaf even if it also has children).
columns: ColumnsSpecHow the value columns are read from a leaf.
ancestors: Option<AncestorsSpec>Ancestor/group labels carried onto every row.
path_as: Option<String>Emit the joined ancestor path under this column (e.g. Income > Sales).
path_sep: StringSeparator for path_as.
drop_empty: boolSkip leaves whose value cells are all empty (null or "").
emit_group_rows: boolAlso emit a row for a group node that carries its own cells (subtotals).
max_depth: usizeStack-overflow backstop; a branch deeper than this is truncated (logged).
Implementations§
Source§impl TreeFlattenSpec
impl TreeFlattenSpec
Sourcepub fn compile(&self) -> Result<CompiledTreeFlatten, FaucetError>
pub fn compile(&self) -> Result<CompiledTreeFlatten, FaucetError>
Validate the spec, returning a reusable CompiledTreeFlatten.
Sourcepub fn into_stage(&self) -> Result<TransformStage, FaucetError>
pub fn into_stage(&self) -> Result<TransformStage, FaucetError>
Compile and wrap as a TransformStage::Custom (1→0..N).
Trait Implementations§
Source§impl Clone for TreeFlattenSpec
impl Clone for TreeFlattenSpec
Source§fn clone(&self) -> TreeFlattenSpec
fn clone(&self) -> TreeFlattenSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TreeFlattenSpec
impl Debug for TreeFlattenSpec
Source§impl<'de> Deserialize<'de> for TreeFlattenSpec
impl<'de> Deserialize<'de> for TreeFlattenSpec
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>,
Source§impl JsonSchema for TreeFlattenSpec
impl JsonSchema for TreeFlattenSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for TreeFlattenSpec
impl PartialEq for TreeFlattenSpec
Source§impl Serialize for TreeFlattenSpec
impl Serialize for TreeFlattenSpec
impl StructuralPartialEq for TreeFlattenSpec
Auto Trait Implementations§
impl Freeze for TreeFlattenSpec
impl RefUnwindSafe for TreeFlattenSpec
impl Send for TreeFlattenSpec
impl Sync for TreeFlattenSpec
impl Unpin for TreeFlattenSpec
impl UnsafeUnpin for TreeFlattenSpec
impl UnwindSafe for TreeFlattenSpec
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request