Struct config_it::entity::EntityData
source · pub struct EntityData { /* private fields */ }Expand description
Events are two directional …
-
Remote commit entity / Local commit entity
- ‘on update’ user observer hooked
- ‘any value update’ observer hooked
-
Local commit entity silent
- ‘any value update’ observer hooked
-
Local set retrieves entity update
Implementations§
source§impl EntityData
impl EntityData
pub fn get_id(&self) -> u64
pub fn get_meta(&self) -> &Arc<Metadata>
pub fn get_update_fence(&self) -> usize
pub fn get_value(&self) -> (&Arc<Metadata>, Arc<dyn EntityTrait>)
sourcepub fn __apply_value(&self, value: Arc<dyn EntityTrait>)
pub fn __apply_value(&self, value: Arc<dyn EntityTrait>)
If silent option is disabled, increase config set and source argument’s fence
by 1, to make self and other instances of config set which shares the same core
be aware of this change.
sourcepub fn update_value_from<'a, T>(&self, de: T) -> Result<bool, Error>where
T: Deserializer<'a>,
pub fn update_value_from<'a, T>(&self, de: T) -> Result<bool, Error>where T: Deserializer<'a>,
Update config entity’s central value by parsing given deserializer.
Returns
Ok(true)- Deserialization successful, validation successful.Ok(false)- Deserialization successful, validation unsuccessful, as value was modified to satisfy validator constraintErr(_)- Deserialization or validation has failed.