1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// SPDX-License-Identifier: Apache-2.0
// Copyright 2026 ZeroDDS Contributors
//! Content filtering and field transformation.
//!
//! Filtering and transformation operate on a decoded view of the sample. The
//! byte path forwards CDR bodies verbatim; to evaluate a SQL filter or rewrite
//! fields the body must be decoded against a known **type shape** (the struct's
//! member layout) into a dynamic value, processed, and re-encoded.
//!
//! [`build_processor`] returns:
//! * `Ok(None)` — no filter and no transform → byte pass-through.
//! * `Ok(Some(_))` — a processor decoding/filtering/re-encoding via the shape.
//! * `Err(_)` — a filter/transform was requested but the type shape could not
//! be resolved or a rule was invalid.
use crateRoute;
use crateResult;
use crateSampleProcessor;
pub use DynamicProcessor;
pub use ;
/// Builds the per-route [`SampleProcessor`], or `None` for byte pass-through.
///
/// `shapes` resolves a type name to its [`TypeShape`]. When a route requests a
/// filter or transform, the input and output types must be present in `shapes`.
///
/// # Errors
/// [`crate::error::RoutingError`] when a requested filter/transform cannot be
/// built (unknown type, bad filter expression, invalid rule).