schema_analysis 0.6.0

Analyze the schema of any self describing format
Documentation
#![allow(missing_docs)]

use serde::{Deserialize, Serialize};

use crate::{traits::Aggregate, traits::Coalesce};

use super::Counter;

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct MapStructContext {
    pub count: Counter,
}
impl Aggregate<[String]> for MapStructContext {
    fn aggregate(&mut self, value: &[String]) {
        self.count.aggregate(value);
    }
}
impl Coalesce for MapStructContext {
    fn coalesce(&mut self, other: Self) {
        self.count.coalesce(other.count);
    }
}
impl PartialEq for MapStructContext {
    fn eq(&self, other: &Self) -> bool {
        self.count == other.count
    }
}