pub struct FlowInstance {
pub id: Uuid,
pub ty: EntityTypeId,
pub name: String,
pub description: String,
pub entity_instances: EntityInstances,
pub relation_instances: RelationInstances,
}
Expand description
A flow instance is a container for entity instances and relation instances.
A flow instance is strictly associated with a wrapper entity instance. The properties of the wrapper entity instance are the properties of the flow.
Additionally, flows can be nested - from the perspective of the outer flow the inner flow acts like an entity instance. The wrapper entity instance of the inner flow is the interface which can be accessed by the outer flow.
Entity instances and relation instances can be shared with multiple flows.
It’s even possible to connect entity instances from different flows with relation instances.
Fields§
§id: Uuid
The id of the flow corresponds to the id of the wrapper entity instance
This means the vector of entity instances must contain an instance with the id of the flow.
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: EntityInstances
The entity instances which are contained in this flow instance.
It can’t have a default because the wrapper entity instance must be present in the list of entities.
relation_instances: RelationInstances
The relation instances which are contained in this flow instance.
By default, no relation instances are contained in this flow instance.
Implementations§
Source§impl FlowInstance
impl FlowInstance
Sourcepub fn builder() -> FlowInstanceBuilder<((), (), (), (), (), ())>
pub fn builder() -> FlowInstanceBuilder<((), (), (), (), (), ())>
Create a builder for building FlowInstance
.
On the builder, call .id(...)
, .ty(...)
, .name(...)
(optional), .description(...)
(optional), .entity_instances(...)
(optional), .relation_instances(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of FlowInstance
.
Source§impl FlowInstance
impl FlowInstance
Sourcepub fn from_instance_with_name<S: Into<String>>(
wrapper_entity_instance: EntityInstance,
name: S,
) -> FlowInstance
pub fn from_instance_with_name<S: Into<String>>( wrapper_entity_instance: EntityInstance, name: S, ) -> FlowInstance
Constructs a new flow instance from the wrapper entity instance.
Trait Implementations§
Source§impl Clone for FlowInstance
impl Clone for FlowInstance
Source§fn clone(&self) -> FlowInstance
fn clone(&self) -> FlowInstance
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FlowInstance
impl Debug for FlowInstance
Source§impl<'de> Deserialize<'de> for FlowInstance
impl<'de> Deserialize<'de> for FlowInstance
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for FlowInstance
impl Display for FlowInstance
Source§impl From<EntityInstance> for FlowInstance
impl From<EntityInstance> for FlowInstance
Source§fn from(wrapper_entity_instance: EntityInstance) -> FlowInstance
fn from(wrapper_entity_instance: EntityInstance) -> FlowInstance
Source§impl FromIterator<FlowInstance> for FlowInstances
impl FromIterator<FlowInstance> for FlowInstances
Source§fn from_iter<I: IntoIterator<Item = FlowInstance>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = FlowInstance>>(iter: I) -> Self
Source§impl Hash for FlowInstance
impl Hash for FlowInstance
Source§impl JsonSchema for FlowInstance
impl JsonSchema for FlowInstance
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref
keyword. Read more§fn always_inline_schema() -> bool
fn always_inline_schema() -> bool
inline_schema()
insteadinline_schema()
instead“. Read moreSource§impl NamespacedTypeGetter for FlowInstance
impl NamespacedTypeGetter for FlowInstance
Source§impl Ord for FlowInstance
impl Ord for FlowInstance
Source§impl PartialEq<Uuid> for FlowInstance
impl PartialEq<Uuid> for FlowInstance
Source§impl PartialEq for FlowInstance
impl PartialEq for FlowInstance
Source§impl PartialOrd for FlowInstance
impl PartialOrd for FlowInstance
Source§impl Serialize for FlowInstance
impl Serialize for FlowInstance
Source§impl TypeDefinitionGetter for FlowInstance
impl TypeDefinitionGetter for FlowInstance
Source§fn type_definition(&self) -> TypeDefinition
fn type_definition(&self) -> TypeDefinition
impl Eq for FlowInstance
impl StructuralPartialEq for FlowInstance
Auto Trait Implementations§
impl Freeze for FlowInstance
impl !RefUnwindSafe for FlowInstance
impl Send for FlowInstance
impl Sync for FlowInstance
impl Unpin for FlowInstance
impl UnwindSafe for FlowInstance
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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>
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>
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