reactive_graph_reactive_service_api/property/property_u64/
eq.rs

1use crate::TypedReactivePropertyImpl;
2use reactive_graph_reactive_model_api::ReactiveInstance;
3
4impl<IdType, ReactiveInstanceType> PartialEq<u64> for TypedReactivePropertyImpl<IdType, ReactiveInstanceType, u64>
5where
6    IdType: Clone,
7    ReactiveInstanceType: ReactiveInstance<IdType>,
8{
9    fn eq(&self, other: &u64) -> bool {
10        self.reactive_instance.as_u64(&self.property_name).map(|v| &v == other).unwrap_or_default()
11    }
12}
13
14impl<IdType, ReactiveInstanceType> PartialEq<TypedReactivePropertyImpl<IdType, ReactiveInstanceType, u64>> for u64
15where
16    IdType: Clone,
17    ReactiveInstanceType: ReactiveInstance<IdType>,
18{
19    fn eq(&self, other: &TypedReactivePropertyImpl<IdType, ReactiveInstanceType, u64>) -> bool {
20        other.reactive_instance.as_u64(&other.property_name).map(|v| &v == self).unwrap_or_default()
21    }
22}