reactive_graph_reactive_service_api/property/property_bool/
eq.rs1use crate::TypedReactivePropertyImpl;
2use reactive_graph_reactive_model_api::ReactiveInstance;
3
4impl<IdType, ReactiveInstanceType> PartialEq<bool> for TypedReactivePropertyImpl<IdType, ReactiveInstanceType, bool>
5where
6 IdType: Clone,
7 ReactiveInstanceType: ReactiveInstance<IdType>,
8{
9 fn eq(&self, other: &bool) -> bool {
10 self.reactive_instance.as_bool(&self.property_name).map(|v| &v == other).unwrap_or_default()
11 }
12}