edict 0.6.1

Experimental entity-component-system library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::{ExclusiveRelation, Relation};

/// Child -> Parent relation.
/// Children can have only one parent. So this relation is exclusive.
/// Children should be despawned when parent is despawned. So this relation is owned.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ChildOf;

impl Relation for ChildOf {
    const EXCLUSIVE: bool = true;
    const OWNED: bool = true;
    const SYMMETRIC: bool = false;
}

impl ExclusiveRelation for ChildOf {}