pub struct GroupId { /* private fields */ }
Expand description
A group ID. The group ID is chosen by the creator of the group and should be globally unique.
Implementations§
Source§impl GroupId
impl GroupId
Sourcepub fn random(rng: &impl OpenMlsRand) -> Self
pub fn random(rng: &impl OpenMlsRand) -> Self
Create a new (random) group ID.
Group IDs should be random and not be misused as, e.g., a group name.
Sourcepub fn from_slice(bytes: &[u8]) -> Self
pub fn from_slice(bytes: &[u8]) -> Self
Create a group ID from a byte slice.
This should be used only if the group ID is chosen by an entity that ensures uniqueness.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GroupId
impl<'de> Deserialize<'de> for GroupId
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 Deserialize for GroupId
impl Deserialize for GroupId
Source§fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
This function deserializes the
bytes
from the provided a std::io::Read
and returns the populated struct. Read moreSource§impl DeserializeBytes for GroupId
impl DeserializeBytes for GroupId
Source§impl Ord for GroupId
impl Ord for GroupId
Source§impl PartialOrd for GroupId
impl PartialOrd for GroupId
impl Eq for GroupId
impl GroupId<CURRENT_VERSION> for GroupId
impl Key<CURRENT_VERSION> for GroupId
impl StructuralPartialEq for GroupId
Auto Trait Implementations§
impl Freeze for GroupId
impl RefUnwindSafe for GroupId
impl Send for GroupId
impl Sync for GroupId
impl Unpin for GroupId
impl UnwindSafe for GroupId
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<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