use std::fmt::Debug; use std::hash::{Hash, Hasher}; use aws_sdk_route53::types::ResourceRecordSet; pub trait SimpleHash { fn hash(&self, state: &mut H); } #[derive(Debug, PartialEq, Clone)] pub struct Hashable(T); impl AsRef for Hashable { fn as_ref(&self) -> &T { &self.0 } } impl Eq for Hashable where Hashable: PartialEq {} impl Hash for Hashable { fn hash(&self, state: &mut H) { self.0.hash(state) } } impl From for Hashable { fn from(value: T) -> Self { Self(value) } } impl SimpleHash for ResourceRecordSet { fn hash(&self, state: &mut H) { self.name().hash(state) } }