pub struct ReactiveFlowInstance {
pub id: Uuid,
pub ty: EntityTypeId,
pub name: String,
pub description: String,
pub entity_instances: RwLock<HashMap<Uuid, ReactiveEntity>>,
pub relation_instances: RwLock<HashMap<RelationInstanceId, ReactiveRelation>>,
pub entities_added: RwLock<Vec<Uuid>>,
pub entities_removed: RwLock<Vec<Uuid>>,
pub relations_added: RwLock<Vec<RelationInstanceId>>,
pub relations_removed: RwLock<Vec<RelationInstanceId>>,
}
Fields§
§id: Uuid
The id of the flow corresponds to the id of the wrapper entity instance.
ty: EntityTypeId
The type definition of the entity type of the wrapper entity instance.
name: String
The name of the flow instance.
description: String
Textual description of the flow instance.
entity_instances: RwLock<HashMap<Uuid, ReactiveEntity>>
The flow contains entity instances. The entity instance may also be contained in other flows.
relation_instances: RwLock<HashMap<RelationInstanceId, ReactiveRelation>>
The flow contains relation instances. The relation instances may also be contained in other flows.
entities_added: RwLock<Vec<Uuid>>
List of entities that has been added since creation of the flow.
entities_removed: RwLock<Vec<Uuid>>
List of entities that has been removed since creation of the flow.
relations_added: RwLock<Vec<RelationInstanceId>>
List of relations that has been added since creation of the flow.
relations_removed: RwLock<Vec<RelationInstanceId>>
List of relations that has been removed since creation of the flow.
Implementations§
Source§impl ReactiveFlowInstance
impl ReactiveFlowInstance
pub fn new(wrapper_entity_instance: ReactiveEntity) -> Self
pub fn has_entity(&self, entity_instance: ReactiveEntity) -> bool
pub fn has_entity_by_id(&self, id: Uuid) -> bool
pub fn get_entity(&self, id: Uuid) -> Option<ReactiveEntity>
pub fn get_wrapper_entity_instance(&self) -> Option<ReactiveEntity>
pub fn add_entity(&self, entity_instance: ReactiveEntity)
pub fn remove_entity(&self, id: Uuid)
pub fn has_relation(&self, relation_instance: ReactiveRelation) -> bool
pub fn has_relation_by_key( &self, relation_instance_id: &RelationInstanceId, ) -> bool
pub fn get_relation( &self, relation_instance_id: &RelationInstanceId, ) -> Option<ReactiveRelation>
pub fn add_relation(&self, relation_instance: ReactiveRelation)
pub fn remove_relation(&self, relation_instance_id: &RelationInstanceId)
pub fn tick(&self)
Trait Implementations§
Source§impl Display for ReactiveFlowInstance
impl Display for ReactiveFlowInstance
Source§impl From<ReactiveEntity> for ReactiveFlowInstance
impl From<ReactiveEntity> for ReactiveFlowInstance
Source§fn from(wrapper_entity_instance: ReactiveEntity) -> Self
fn from(wrapper_entity_instance: ReactiveEntity) -> Self
Converts to this type from the input type.
Source§impl From<ReactiveFlowInstance> for ReactiveFlow
impl From<ReactiveFlowInstance> for ReactiveFlow
Source§fn from(reactive_flow: ReactiveFlowInstance) -> Self
fn from(reactive_flow: ReactiveFlowInstance) -> Self
Converts to this type from the input type.
Source§impl NamespacedTypeGetter for ReactiveFlowInstance
impl NamespacedTypeGetter for ReactiveFlowInstance
Source§impl PropertyInstanceGetter for ReactiveFlowInstance
impl PropertyInstanceGetter for ReactiveFlowInstance
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 ReactiveFlowInstance
impl PropertyInstanceSetter for ReactiveFlowInstance
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 TryFrom<&ReactiveFlowInstance> for FlowInstance
impl TryFrom<&ReactiveFlowInstance> for FlowInstance
Source§impl TryFrom<FlowInstance> for ReactiveFlowInstance
impl TryFrom<FlowInstance> for ReactiveFlowInstance
Source§impl TryFrom<ReactiveFlowInstance> for FlowInstance
impl TryFrom<ReactiveFlowInstance> for FlowInstance
Source§impl TypeDefinitionGetter for &ReactiveFlowInstance
impl TypeDefinitionGetter for &ReactiveFlowInstance
Source§fn type_definition(&self) -> TypeDefinition
fn type_definition(&self) -> TypeDefinition
Returns the type definition of the type.
Source§impl TypeDefinitionGetter for ReactiveFlowInstance
impl TypeDefinitionGetter for ReactiveFlowInstance
Source§fn type_definition(&self) -> TypeDefinition
fn type_definition(&self) -> TypeDefinition
Returns the type definition of the type.
Auto Trait Implementations§
impl !Freeze for ReactiveFlowInstance
impl RefUnwindSafe for ReactiveFlowInstance
impl Send for ReactiveFlowInstance
impl Sync for ReactiveFlowInstance
impl Unpin for ReactiveFlowInstance
impl UnwindSafe for ReactiveFlowInstance
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> 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).