pub struct GroupManager {
    groups: Slab<GroupInfo>,
}Fields§
§groups: Slab<GroupInfo>Implementations§
Source§impl GroupManager
 
impl GroupManager
pub fn group_info(&self, group: Group) -> Option<&GroupInfo>
pub fn add_group_member( &mut self, leader: Entity, new_member: Entity, entities: &Read<'_, EntitiesRes>, groups: &mut Storage<'_, Group, FetchMut<'_, MaskedStorage<Group>>>, alignments: &Storage<'_, Alignment, Fetch<'_, MaskedStorage<Alignment>>>, uids: &Storage<'_, Uid, Fetch<'_, MaskedStorage<Uid>>>, notifier: impl FnMut(Entity, ChangeNotification<Entity>), )
pub fn new_pet( &mut self, pet: Entity, owner: Entity, groups: &mut Storage<'_, Group, FetchMut<'_, MaskedStorage<Group>>>, entities: &Read<'_, EntitiesRes>, alignments: &Storage<'_, Alignment, Fetch<'_, MaskedStorage<Alignment>>>, uids: &Storage<'_, Uid, Fetch<'_, MaskedStorage<Uid>>>, notifier: &mut impl FnMut(Entity, ChangeNotification<Entity>), )
pub fn leave_group( &mut self, member: Entity, groups: &mut Storage<'_, Group, FetchMut<'_, MaskedStorage<Group>>>, alignments: &Storage<'_, Alignment, Fetch<'_, MaskedStorage<Alignment>>>, uids: &Storage<'_, Uid, Fetch<'_, MaskedStorage<Uid>>>, entities: &Read<'_, EntitiesRes>, notifier: &mut impl FnMut(Entity, ChangeNotification<Entity>), )
pub fn entity_deleted( &mut self, member: Entity, groups: &mut Storage<'_, Group, FetchMut<'_, MaskedStorage<Group>>>, alignments: &Storage<'_, Alignment, Fetch<'_, MaskedStorage<Alignment>>>, uids: &Storage<'_, Uid, Fetch<'_, MaskedStorage<Uid>>>, entities: &EntitiesRes, notifier: &mut impl FnMut(Entity, ChangeNotification<Entity>), )
pub fn assign_leader<'a>( &mut self, new_leader: Entity, groups: impl GenericReadStorage<Component = Group> + Join<Type = &'a Group> + 'a, entities: &'a Read<'_, EntitiesRes>, alignments: &'a Storage<'_, Alignment, Fetch<'_, MaskedStorage<Alignment>>>, uids: &'a Storage<'_, Uid, Fetch<'_, MaskedStorage<Uid>>>, notifier: impl FnMut(Entity, ChangeNotification<Entity>), )
Trait Implementations§
Source§impl Debug for GroupManager
 
impl Debug for GroupManager
Source§impl Default for GroupManager
 
impl Default for GroupManager
Source§fn default() -> GroupManager
 
fn default() -> GroupManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GroupManager
impl RefUnwindSafe for GroupManager
impl Send for GroupManager
impl Sync for GroupManager
impl Unpin for GroupManager
impl UnwindSafe for GroupManager
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
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts 
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
 
impl<T> Pointable for T
Source§impl<Context> SubContext<Context> for Context
 
impl<Context> SubContext<Context> for Context
fn sub_context(self) -> Context
§impl<T> TryDefault for Twhere
    T: Default,
 
impl<T> TryDefault for Twhere
    T: Default,
§fn try_default() -> Result<T, String>
 
fn try_default() -> Result<T, String>
Tries to create the default.
§fn unwrap_default() -> Self
 
fn unwrap_default() -> Self
Calls 
try_default and panics on an error case.