pub struct ReactiveEntity(/* private fields */);
Implementations§
Source§impl ReactiveEntity
impl ReactiveEntity
pub fn builder() -> ReactiveEntityInstanceBuilder
Sourcepub fn builder_from_entity_type(
entity_type: &EntityType,
) -> ReactiveEntityInstanceBuilder<((EntityTypeId,), (Uuid,), (), (), (ReactiveProperties<Uuid>,), (), ())>
pub fn builder_from_entity_type( entity_type: &EntityType, ) -> ReactiveEntityInstanceBuilder<((EntityTypeId,), (Uuid,), (), (), (ReactiveProperties<Uuid>,), (), ())>
Creates a builder from the given entity type. Generates an id for the reactive entity. Converts property types into reactive properties and initializes the properties with default values.
Trait Implementations§
Source§impl BehaviourTypesContainer for ReactiveEntity
impl BehaviourTypesContainer for ReactiveEntity
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 ReactiveEntity
impl Clone for ReactiveEntity
Source§fn clone(&self) -> ReactiveEntity
fn clone(&self) -> ReactiveEntity
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 ReactiveEntity
impl ComponentContainer for ReactiveEntity
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 ReactiveEntity
impl Deref for ReactiveEntity
Source§impl Display for ReactiveEntity
impl Display for ReactiveEntity
Source§impl From<&ReactiveEntity> for EntityInstance
impl From<&ReactiveEntity> for EntityInstance
Source§fn from(entity: &ReactiveEntity) -> Self
fn from(entity: &ReactiveEntity) -> Self
Converts to this type from the input type.
Source§impl From<EntityInstance> for ReactiveEntity
impl From<EntityInstance> for ReactiveEntity
Source§impl From<ReactiveEntity> for EntityInstance
impl From<ReactiveEntity> for EntityInstance
Source§fn from(entity: ReactiveEntity) -> Self
fn from(entity: ReactiveEntity) -> Self
Converts to this type from the input type.
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<ReactiveEntityInstance> for ReactiveEntity
impl From<ReactiveEntityInstance> for ReactiveEntity
Source§fn from(reactive_entity: ReactiveEntityInstance) -> Self
fn from(reactive_entity: ReactiveEntityInstance) -> Self
Converts to this type from the input type.
Source§impl NamedInstanceContainer for ReactiveEntity
impl NamedInstanceContainer for ReactiveEntity
Source§impl NamespacedTypeGetter for ReactiveEntity
impl NamespacedTypeGetter for ReactiveEntity
Source§impl PropertyInstanceGetter for ReactiveEntity
impl PropertyInstanceGetter for ReactiveEntity
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 ReactiveEntity
impl PropertyInstanceSetter for ReactiveEntity
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<Uuid> for ReactiveEntity
impl ReactiveInstance<Uuid> for ReactiveEntity
Source§impl ReactivePropertyContainer for ReactiveEntity
impl ReactivePropertyContainer for ReactiveEntity
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 ReactiveEntity
impl Serialize for ReactiveEntity
Source§impl TypeDefinitionGetter for &ReactiveEntity
impl TypeDefinitionGetter for &ReactiveEntity
Source§fn type_definition(&self) -> TypeDefinition
fn type_definition(&self) -> TypeDefinition
Returns the type definition of the type.
Source§impl TypeDefinitionGetter for ReactiveEntity
impl TypeDefinitionGetter for ReactiveEntity
Source§fn type_definition(&self) -> TypeDefinition
fn type_definition(&self) -> TypeDefinition
Returns the type definition of the type.
Auto Trait Implementations§
impl Freeze for ReactiveEntity
impl !RefUnwindSafe for ReactiveEntity
impl Send for ReactiveEntity
impl Sync for ReactiveEntity
impl Unpin for ReactiveEntity
impl !UnwindSafe for ReactiveEntity
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).