Enum veloren_common::comp::anchor::Anchor
source · pub enum Anchor {
Entity(Entity),
Chunk(Vec2<i32>),
}
Expand description
This component exists in order to fix a bug that caused entities such as campfires to duplicate because the chunk was double-loaded. See https://gitlab.com/veloren/veloren/-/merge_requests/1543
Variants§
Entity(Entity)
An entity with an Entity Anchor will be destroyed when its anchor Entity no longer exists
Chunk(Vec2<i32>)
An entity with Chunk Anchor will be destroyed when both the chunk it’s currently positioned within and its anchor chunk are unloaded
Trait Implementations§
source§impl PartialEq for Anchor
impl PartialEq for Anchor
impl Copy for Anchor
impl Eq for Anchor
impl StructuralEq for Anchor
impl StructuralPartialEq for Anchor
Auto Trait Implementations§
impl RefUnwindSafe for Anchor
impl Send for Anchor
impl Sync for Anchor
impl Unpin for Anchor
impl UnwindSafe for Anchor
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
§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
Checks if this value is equivalent to the given key. Read more
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key
and return true
if they are equal.