pub trait CanUpdate<Entity>: Sized {
    // Provided methods
    fn can_add(&self, _new: &Entity) -> bool { ... }
    fn can_replace(&self, _new: &Entity, _current: &Entity) -> bool { ... }
    fn can_remove(&self, _entity: &Entity) -> bool { ... }
}
Expand description

Checks whether an actor can update an entity.

Provided Methods§

source

fn can_add(&self, _new: &Entity) -> bool

Checks whether the new entity can be added.

source

fn can_replace(&self, _new: &Entity, _current: &Entity) -> bool

Checks whether the provided entity can replace the existing one.

source

fn can_remove(&self, _entity: &Entity) -> bool

Checks whether the existing entity can be removed.

Implementors§