Struct re_entity_db::entity_tree::ClearCascade
source · pub struct ClearCascade {
pub to_be_cleared: BTreeMap<RowId, BTreeMap<EntityPath, (TimePoint, BTreeSet<ComponentPath>)>>,
}
Expand description
Cascaded clears that need be to applied to the DataStore
as a result of modifying the EntityTree
.
When an EntityTree
gets updated with new data, two cascading effects might happen:
-
If the data contains a
Clear
component, then inserting it will trigger an immediate clear at this specific timepoint, that can affect an arbitrary number of components and, if theClear
is recursive, even an arbitrary number of entity paths. ThatClear
then lives on and might affect data added later on, which leads us to side-effect #2 described below. -
If data is inserted at an entity path that is under the influence of a previously logged
Clear
component, then the insertion will trigger a pending clear for all components at that path.
Clear
components themselves are not affected by clears.
Fields§
§to_be_cleared: BTreeMap<RowId, BTreeMap<EntityPath, (TimePoint, BTreeSet<ComponentPath>)>>
ComponentPath
s that should be cleared as a result of the cascade.
Keep in mind: these are the RowId
s of the Clear
components that triggered the
cascades, they are therefore not unique and, by definition, illegal!
Implementations§
Trait Implementations§
source§impl Clone for ClearCascade
impl Clone for ClearCascade
source§fn clone(&self) -> ClearCascade
fn clone(&self) -> ClearCascade
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ClearCascade
impl Debug for ClearCascade
source§impl Default for ClearCascade
impl Default for ClearCascade
source§fn default() -> ClearCascade
fn default() -> ClearCascade
Auto Trait Implementations§
impl Freeze for ClearCascade
impl RefUnwindSafe for ClearCascade
impl Send for ClearCascade
impl Sync for ClearCascade
impl Unpin for ClearCascade
impl UnwindSafe for ClearCascade
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> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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