pub struct ReactiveRelation(/* private fields */);
Implementations§
Source§impl ReactiveRelation
impl ReactiveRelation
pub fn builder() -> ReactiveRelationInstanceBuilder
pub fn builder_with_entities( outbound: ReactiveEntity, ty: &RelationInstanceTypeId, inbound: ReactiveEntity, ) -> ReactiveRelationInstanceBuilder<((ReactiveEntity,), (RelationInstanceTypeId,), (ReactiveEntity,), (), (), (), (), ())>
Sourcepub fn builder_with_entities_and_properties(
outbound: ReactiveEntity,
ty: &RelationInstanceTypeId,
inbound: ReactiveEntity,
properties: &PropertyTypes,
) -> ReactiveRelationInstanceBuilder<((ReactiveEntity,), (RelationInstanceTypeId,), (ReactiveEntity,), (), (), (ReactiveProperties<RelationInstanceId>,), (), ())>
pub fn builder_with_entities_and_properties( outbound: ReactiveEntity, ty: &RelationInstanceTypeId, inbound: ReactiveEntity, properties: &PropertyTypes, ) -> ReactiveRelationInstanceBuilder<((ReactiveEntity,), (RelationInstanceTypeId,), (ReactiveEntity,), (), (), (ReactiveProperties<RelationInstanceId>,), (), ())>
Creates a builder for the given relation instance type id. Generates an id for the reactive relation. Converts property types into reactive properties and initializes the properties with default values.
pub fn builder_from_type_with_unique_id( outbound: ReactiveEntity, relation_type: &RelationType, inbound: ReactiveEntity, ) -> ReactiveRelationInstanceBuilder<((ReactiveEntity,), (RelationInstanceTypeId,), (ReactiveEntity,), (), (), (ReactiveProperties<RelationInstanceId>,), (), ())>
pub fn builder_from_type_with_unique_instance_id( outbound: ReactiveEntity, relation_type: &RelationType, instance_id: String, inbound: ReactiveEntity, ) -> ReactiveRelationInstanceBuilder<((ReactiveEntity,), (RelationInstanceTypeId,), (ReactiveEntity,), (), (), (ReactiveProperties<RelationInstanceId>,), (), ())>
pub fn builder_from_type_with_random_instance_id( outbound: ReactiveEntity, relation_type: &RelationType, inbound: ReactiveEntity, ) -> ReactiveRelationInstanceBuilder<((ReactiveEntity,), (RelationInstanceTypeId,), (ReactiveEntity,), (), (), (ReactiveProperties<RelationInstanceId>,), (), ())>
pub fn new_from_properties( outbound: ReactiveEntity, ty: RelationInstanceTypeId, inbound: ReactiveEntity, properties: DashMap<String, Value>, ) -> ReactiveRelation
pub fn new_from_instance( outbound: ReactiveEntity, inbound: ReactiveEntity, instance: RelationInstance, ) -> ReactiveRelation
Trait Implementations§
Source§impl BehaviourTypesContainer for ReactiveRelation
impl BehaviourTypesContainer for ReactiveRelation
Source§fn get_behaviours(&self) -> Vec<BehaviourTypeId>
fn get_behaviours(&self) -> Vec<BehaviourTypeId>
Returns the behaviour types of the container.
Source§fn add_behaviour(&self, ty: BehaviourTypeId)
fn add_behaviour(&self, ty: BehaviourTypeId)
Adds a behaviour to the container.
Source§fn remove_behaviour(&self, ty: &BehaviourTypeId)
fn remove_behaviour(&self, ty: &BehaviourTypeId)
Removes a behaviour from the container.
Source§fn behaves_as(&self, ty: &BehaviourTypeId) -> bool
fn behaves_as(&self, ty: &BehaviourTypeId) -> bool
Returns true, if the reactive instance behaves as the given behaviour.
Source§impl Clone for ReactiveRelation
impl Clone for ReactiveRelation
Source§fn clone(&self) -> ReactiveRelation
fn clone(&self) -> ReactiveRelation
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl ComponentContainer for ReactiveRelation
impl ComponentContainer for ReactiveRelation
Source§fn get_components(&self) -> ComponentTypeIds
fn get_components(&self) -> ComponentTypeIds
Returns the component types of the container.
Source§fn add_component(&self, ty: ComponentTypeId)
fn add_component(&self, ty: ComponentTypeId)
Adds a component to the container.
Source§fn add_component_with_properties(&self, component: &Component)
fn add_component_with_properties(&self, component: &Component)
Adds a component to the container and initializes the reactive property instances.
Source§fn remove_component(&self, ty: &ComponentTypeId)
fn remove_component(&self, ty: &ComponentTypeId)
Removes a component from the container.
Source§impl Deref for ReactiveRelation
impl Deref for ReactiveRelation
Source§impl Display for ReactiveRelation
impl Display for ReactiveRelation
Source§impl From<&ReactiveRelation> for RelationInstance
impl From<&ReactiveRelation> for RelationInstance
Source§fn from(relation: &ReactiveRelation) -> Self
fn from(relation: &ReactiveRelation) -> Self
Converts to this type from the input type.
Source§impl From<ReactiveRelation> for RelationInstance
impl From<ReactiveRelation> for RelationInstance
Source§fn from(relation: ReactiveRelation) -> Self
fn from(relation: ReactiveRelation) -> Self
Converts to this type from the input type.
Source§impl From<ReactiveRelationInstance> for ReactiveRelation
impl From<ReactiveRelationInstance> for ReactiveRelation
Source§fn from(relation_instance: ReactiveRelationInstance) -> Self
fn from(relation_instance: ReactiveRelationInstance) -> Self
Converts to this type from the input type.
Source§impl NamedInstanceContainer for ReactiveRelation
impl NamedInstanceContainer for ReactiveRelation
Source§impl NamespacedTypeGetter for ReactiveRelation
impl NamespacedTypeGetter for ReactiveRelation
Source§impl PropertyInstanceGetter for ReactiveRelation
impl PropertyInstanceGetter for ReactiveRelation
Source§fn get<S: Into<String>>(&self, property_name: S) -> Option<Value>
fn get<S: Into<String>>(&self, property_name: S) -> Option<Value>
Returns the json value of the given property by name
Source§fn as_bool<S: Into<String>>(&self, property_name: S) -> Option<bool>
fn as_bool<S: Into<String>>(&self, property_name: S) -> Option<bool>
Returns the boolean value of the given property by name
Source§fn as_u64<S: Into<String>>(&self, property_name: S) -> Option<u64>
fn as_u64<S: Into<String>>(&self, property_name: S) -> Option<u64>
Returns the u64 value of the given property by name
Source§fn as_i64<S: Into<String>>(&self, property_name: S) -> Option<i64>
fn as_i64<S: Into<String>>(&self, property_name: S) -> Option<i64>
Returns the i64 value of the given property by name
Source§fn as_f64<S: Into<String>>(&self, property_name: S) -> Option<f64>
fn as_f64<S: Into<String>>(&self, property_name: S) -> Option<f64>
Returns the f64 value of the given property by name
Source§fn as_string<S: Into<String>>(&self, property_name: S) -> Option<String>
fn as_string<S: Into<String>>(&self, property_name: S) -> Option<String>
Returns the string value of the given property by name
Source§impl PropertyInstanceSetter for ReactiveRelation
impl PropertyInstanceSetter for ReactiveRelation
Source§fn set_checked<S: Into<String>>(&self, property_name: S, value: Value)
fn set_checked<S: Into<String>>(&self, property_name: S, value: Value)
Sets the value of the given property by name if the property is mutable.
Source§fn set<S: Into<String>>(&self, property_name: S, value: Value)
fn set<S: Into<String>>(&self, property_name: S, value: Value)
Sets the value of the given property by name
Source§fn set_no_propagate_checked<S: Into<String>>(
&self,
property_name: S,
value: Value,
)
fn set_no_propagate_checked<S: Into<String>>( &self, property_name: S, value: Value, )
Sets the value of the given property by name if the property is mutable. Sends the value
down the stream.
Source§fn set_no_propagate<S: Into<String>>(&self, property_name: S, value: Value)
fn set_no_propagate<S: Into<String>>(&self, property_name: S, value: Value)
Sets the value of the given property by name. Sends the value down the stream.
Source§fn mutability<S: Into<String>>(&self, property_name: S) -> Option<Mutability>
fn mutability<S: Into<String>>(&self, property_name: S) -> Option<Mutability>
Returns the mutability of the property by name.
Source§fn set_mutability<S: Into<String>>(
&self,
property_name: S,
mutability: Mutability,
)
fn set_mutability<S: Into<String>>( &self, property_name: S, mutability: Mutability, )
Sets the mutability of the property by name.
Source§impl ReactiveInstance<RelationInstanceId> for ReactiveRelation
impl ReactiveInstance<RelationInstanceId> for ReactiveRelation
Source§impl ReactivePropertyContainer for ReactiveRelation
impl ReactivePropertyContainer for ReactiveRelation
Source§fn tick_checked(&self)
fn tick_checked(&self)
Sends the current value down the stream if mutable.
Source§fn has_property(&self, name: &str) -> bool
fn has_property(&self, name: &str) -> bool
Returns true, if a property with the given name exists.
Source§fn add_property<S: Into<String>>(
&self,
name: S,
mutability: Mutability,
value: Value,
)
fn add_property<S: Into<String>>( &self, name: S, mutability: Mutability, value: Value, )
Adds a reactive property with the given name and the given initial value.
Source§fn add_property_by_type(&self, property: &PropertyType)
fn add_property_by_type(&self, property: &PropertyType)
Adds a reactive property with the given name and the given initial value.
Source§fn remove_property<S: Into<String>>(&self, name: S)
fn remove_property<S: Into<String>>(&self, name: S)
Removes the reactive property with the given name.
Source§fn observe_with_handle<F>(&self, name: &str, subscriber: F, handle_id: u128)
fn observe_with_handle<F>(&self, name: &str, subscriber: F, handle_id: u128)
Observe the stream output flowing out of the stream of the property with the given
name. The handle_id allows to remove the observer again.
Source§fn remove_observer(&self, name: &str, handle_id: u128)
fn remove_observer(&self, name: &str, handle_id: u128)
Removes the subscriber with the given handle_id from the stream of the property with the
given name.
Source§fn remove_observers(&self, name: &str)
fn remove_observers(&self, name: &str)
Removes the subscribers of the property with the given name.
Source§fn remove_all_observers(&self)
fn remove_all_observers(&self)
Removes all subscribers of all properties.
Source§impl Serialize for ReactiveRelation
impl Serialize for ReactiveRelation
Source§impl TypeDefinitionGetter for &ReactiveRelation
impl TypeDefinitionGetter for &ReactiveRelation
Source§fn type_definition(&self) -> TypeDefinition
fn type_definition(&self) -> TypeDefinition
Returns the type definition of the type.
Source§impl TypeDefinitionGetter for ReactiveRelation
impl TypeDefinitionGetter for ReactiveRelation
Source§fn type_definition(&self) -> TypeDefinition
fn type_definition(&self) -> TypeDefinition
Returns the type definition of the type.
Auto Trait Implementations§
impl Freeze for ReactiveRelation
impl !RefUnwindSafe for ReactiveRelation
impl Send for ReactiveRelation
impl Sync for ReactiveRelation
impl Unpin for ReactiveRelation
impl !UnwindSafe for ReactiveRelation
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> JsonSchemaIdGetter for Twhere
T: TypeDefinitionGetter,
impl<T> JsonSchemaIdGetter for Twhere
T: TypeDefinitionGetter,
§fn json_schema_id(&self) -> JsonSchemaId
fn json_schema_id(&self) -> JsonSchemaId
Returns the JSON Schema identifier ($id).