pub struct Group { /* private fields */ }
Expand description
Represents a user group with associated metadata and member list.
This structure contains all the information needed to represent a group in the system, including its unique identifier, name, and list of users that belong to the group.
Implementations§
Source§impl Group
impl Group
Sourcepub fn new(
identifier: GroupIdentifierInner,
name: String,
users: Vec<UserIdentifierInner>,
) -> Self
pub fn new( identifier: GroupIdentifierInner, name: String, users: Vec<UserIdentifierInner>, ) -> Self
Sourcepub fn get_identifier(&self) -> GroupIdentifier
pub fn get_identifier(&self) -> GroupIdentifier
Returns the group’s unique identifier.
§Returns
A Group_identifier_type
containing the group’s unique ID.
Sourcepub fn get_users(&self) -> &[UserIdentifier]
pub fn get_users(&self) -> &[UserIdentifier]
Returns the list of users that belong to this group.
This function uses unsafe transmutation to avoid copying the vector,
since User_identifier_type
is transparent to User_identifier_inner_type
.
§Returns
A slice of User_identifier_type
containing all group members.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Group
impl RefUnwindSafe for Group
impl Send for Group
impl Sync for Group
impl Unpin for Group
impl UnwindSafe for Group
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