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(backend: &impl OpenMlsCryptoProvider) -> Self
pub fn random(backend: &impl OpenMlsCryptoProvider) -> 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 Ord for GroupId
impl Ord for GroupId
source§impl PartialEq<GroupId> for GroupId
impl PartialEq<GroupId> for GroupId
source§impl PartialOrd<GroupId> for GroupId
impl PartialOrd<GroupId> for GroupId
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for &GroupId
impl Serialize for &GroupId
source§impl Serialize for GroupId
impl Serialize for GroupId
impl Eq for GroupId
impl StructuralEq for GroupId
impl StructuralPartialEq for GroupId
Auto Trait Implementations§
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