reactive_graph_reactive_service_api/property/
container.rs

1use crate::TypedReactivePropertyImpl;
2use reactive_graph_reactive_model_api::ReactiveInstance;
3use reactive_graph_reactive_model_api::ReactiveInstanceContainer;
4
5pub trait TypedReactivePropertyContainer<TY, TypeDefinition> {
6    fn new_with_ty<IntoTy: Into<TY>>(ty: IntoTy) -> Self;
7    fn new_from_type(type_definition: &TypeDefinition) -> Self;
8}
9
10impl<IdType, ReactiveInstanceType, Target> ReactiveInstanceContainer<IdType, ReactiveInstanceType>
11    for TypedReactivePropertyImpl<IdType, ReactiveInstanceType, Target>
12where
13    IdType: Clone,
14    ReactiveInstanceType: ReactiveInstance<IdType>,
15{
16    fn get_reactive_instance(&self) -> &ReactiveInstanceType {
17        &self.reactive_instance
18    }
19}