pub trait RelationCommands {
    // Required methods
    fn set<R: Relation>(&mut self, target: Entity) -> &mut Self;
    fn unset<R: Relation>(&mut self, target: Entity) -> &mut Self;
    fn unset_all<R: Relation>(&mut self) -> &mut Self;
    fn withdraw<R: Relation>(&mut self) -> &mut Self;
    fn checked_despawn(self);
}
Expand description

An extension API to sugar using relation commands.

Required Methods§

source

fn set<R: Relation>(&mut self, target: Entity) -> &mut Self

Set a relationship target.

source

fn unset<R: Relation>(&mut self, target: Entity) -> &mut Self

Unset a relationship target.

source

fn unset_all<R: Relation>(&mut self) -> &mut Self

UnsetAll relationship targets.

source

fn withdraw<R: Relation>(&mut self) -> &mut Self

Withdraw from a relationship.

source

fn checked_despawn(self)

CheckedDespawn an entity.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl RelationCommands for EntityCommands<'_>

source§

fn set<R: Relation>(&mut self, target: Entity) -> &mut Self

source§

fn unset<R: Relation>(&mut self, target: Entity) -> &mut Self

source§

fn unset_all<R: Relation>(&mut self) -> &mut Self

source§

fn withdraw<R: Relation>(&mut self) -> &mut Self

source§

fn checked_despawn(self)

source§

impl RelationCommands for EntityWorldMut<'_>

source§

fn set<R: Relation>(&mut self, target: Entity) -> &mut Self

source§

fn unset<R: Relation>(&mut self, target: Entity) -> &mut Self

source§

fn unset_all<R: Relation>(&mut self) -> &mut Self

source§

fn withdraw<R: Relation>(&mut self) -> &mut Self

source§

fn checked_despawn(self)

Implementors§