pub enum Multity {
One([Entity; 1]),
Two([Entity; 2]),
More(Vec<Entity>),
}
Variants§
Implementations§
Source§impl Multity
impl Multity
pub fn new(entity: Entity) -> Self
pub fn with(self, entity: Entity) -> Self
pub fn len(&self) -> usize
pub fn root(&self) -> Entity
pub fn entity(&self) -> Entity
pub fn parent(&self) -> Option<Self>
pub fn push(&mut self, entity: Entity)
pub fn pop(&mut self) -> Option<Entity>
pub fn prepend(&mut self, other: impl IntoIterator<Item = Entity>)
pub fn append(&mut self, other: impl IntoIterator<Item = Entity>)
pub fn iter(&self) -> impl Iterator<Item = Entity> + '_
pub fn into_inner(self) -> Vec<Entity>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Multity
impl<'de> Deserialize<'de> for Multity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl FromIterator<Entity> for Multity
impl FromIterator<Entity> for Multity
Source§impl Ord for Multity
impl Ord for Multity
Source§impl PartialOrd for Multity
impl PartialOrd for Multity
impl Eq for Multity
impl StructuralPartialEq for Multity
Auto Trait Implementations§
impl Freeze for Multity
impl RefUnwindSafe for Multity
impl Send for Multity
impl Sync for Multity
impl Unpin for Multity
impl UnwindSafe for Multity
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.