pub struct HashMapEntityReplacePolicy<'m>(pub &'m HashMap<Entity, Entity>);Expand description
Default implementation of EntityReplacePolicy that uses a hash map. Keys are entities in the
source world and values are entities in the destination world. (See comments on
EntityReplacePolicy)
Tuple Fields§
§0: &'m HashMap<Entity, Entity>Trait Implementations§
Source§impl<'m, 's> EntityReplacePolicy<'s> for HashMapEntityReplacePolicy<'m>
impl<'m, 's> EntityReplacePolicy<'s> for HashMapEntityReplacePolicy<'m>
Source§fn src_entities<'a>(&'s self) -> Box<dyn Iterator<Item = Entity> + 'a>where
's: 'a,
fn src_entities<'a>(&'s self) -> Box<dyn Iterator<Item = Entity> + 'a>where
's: 'a,
Returns all entities in the source world that will replace data in the destination world Read more
Auto Trait Implementations§
impl<'m> Freeze for HashMapEntityReplacePolicy<'m>
impl<'m> RefUnwindSafe for HashMapEntityReplacePolicy<'m>
impl<'m> Send for HashMapEntityReplacePolicy<'m>
impl<'m> Sync for HashMapEntityReplacePolicy<'m>
impl<'m> Unpin for HashMapEntityReplacePolicy<'m>
impl<'m> UnsafeUnpin for HashMapEntityReplacePolicy<'m>
impl<'m> UnwindSafe for HashMapEntityReplacePolicy<'m>
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> 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>
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