// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // Copyright by contributors to this project. // SPDX-License-Identifier: (Apache-2.0 OR MIT)
impl<'a> Roster<'a> { /// Iterator over the current roster that lazily copies data out of the /// internal group state. /// /// # Warning /// /// The indexes within this iterator do not correlate with indexes of users /// within [`ReceivedMessage`] content descriptions due to the layout of /// member information within a MLS group state. pubfn members_iter(&self) -> impl Iterator<Item = Member> + 'a { self.public_tree
.non_empty_leaves()
.map(|(index, node)| member_from_leaf_node(node, index))
}
/// The current set of group members. This function makes a clone of /// member information from the internal group state. /// /// # Warning /// /// The indexes within this roster do not correlate with indexes of users /// within [`ReceivedMessage`] content descriptions due to the layout of /// member information within a MLS group state. pubfn members(&self) -> Vec<Member> { self.members_iter().collect()
}
/// Retrieve the member with given `index` within the group in time `O(1)`. /// This index does correlate with indexes of users within [`ReceivedMessage`] /// content descriptions. pubfn member_with_index(&self, index: u32) -> Result<Member, MlsError> { let index = LeafIndex::try_from(index)?;
/// Iterator over member's signing identities. /// /// # Warning /// /// The indexes within this iterator do not correlate with indexes of users /// within [`ReceivedMessage`] content descriptions due to the layout of /// member information within a MLS group state. pubfn member_identities_iter(&self) -> impl Iterator<Item = &SigningIdentity> + '_ { self.public_tree
.non_empty_leaves()
.map(|(_, node)| &node.signing_identity)
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.