optify 1.3.2

Simplifies getting the right configuration options for a process using pre-loaded configurations from files (JSON, YAML, etc.) to manage options for experiments or flights. This library is mainly made to support building implementations for other languages such as Node.js, Python, and Ruby. It is not meant to be consumed directly yet.
Documentation
use serde::Deserialize;
use std::hash::{Hash, Hasher};

#[derive(Clone, Debug, Deserialize)]
pub struct Constraints {
    pub constraints: serde_json::Value,
}

impl Hash for Constraints {
    fn hash<H: Hasher>(&self, state: &mut H) {
        // Hash the JSON value as a string for consistency
        self.constraints.to_string().hash(state);
    }
}

impl PartialEq for Constraints {
    fn eq(&self, other: &Self) -> bool {
        self.constraints == other.constraints
    }
}

impl Eq for Constraints {}