Skip to main content

rewrit_core/normalize/
ordering.rs

1use crate::normalize::{NormalizeContext, NormalizeError, Normalizer};
2use rewrit_model::Observation;
3
4#[derive(Debug, Clone, Default)]
5pub struct OrderingNormalizer;
6
7impl Normalizer for OrderingNormalizer {
8    fn name(&self) -> &'static str {
9        "ordering"
10    }
11
12    fn normalize(
13        &self,
14        observation: Observation,
15        _ctx: &NormalizeContext,
16    ) -> Result<Observation, NormalizeError> {
17        // Canonical object values are already stored in BTreeMap. Array ordering
18        // remains significant unless a future policy marks a path unordered.
19        Ok(observation)
20    }
21}