|
|
|
@ -58,6 +58,21 @@ pub struct Group
|
|
|
|
|
inherits: Option<Vec<GroupID>>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Group
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
//TODO: Create bespoke iterator type for this, it's not possible here.
|
|
|
|
|
pub fn inherits<'b, 'a>(&'b self, space: &'a Userspace) -> impl Iterator<Item = GroupID> +'a
|
|
|
|
|
where 'b: 'a
|
|
|
|
|
{
|
|
|
|
|
match &self.inherits {
|
|
|
|
|
Some(inherits) => inherits.iter()
|
|
|
|
|
.filter_map(|group| group.find_in_space(space).map(|parent| parent.inherits(space))).flatten(),
|
|
|
|
|
None => todo!()
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub trait AsEntityId
|
|
|
|
|
{
|
|
|
|
|
fn entity_id(&self) -> Cow<'_, EntityID>;
|
|
|
|
|