pub struct ProposalBundle { /* private fields */ }
Expand description
A collection of proposals.
Implementations§
Source§impl ProposalBundle
impl ProposalBundle
pub fn add( &mut self, proposal: Proposal, sender: Sender, source: ProposalSource, )
Sourcepub fn remove<T: Proposable>(&mut self, index: usize)
pub fn remove<T: Proposable>(&mut self, index: usize)
Remove the proposal of type T
at index
Type T
can be any of the standard MLS proposal types defined in the
proposal
module.
index
is consistent with the index returned by any of the proposal
type specific functions in this module.
Sourcepub fn by_type<'a, T: Proposable + 'a>(
&'a self,
) -> impl Iterator<Item = &'a ProposalInfo<T>>
pub fn by_type<'a, T: Proposable + 'a>( &'a self, ) -> impl Iterator<Item = &'a ProposalInfo<T>>
Iterate over proposals, filtered by type.
Type T
can be any of the standard MLS proposal types defined in the
proposal
module.
Sourcepub fn retain_by_type<T, F, E>(&mut self, f: F) -> Result<(), E>
pub fn retain_by_type<T, F, E>(&mut self, f: F) -> Result<(), E>
Retain proposals, filtered by type.
Type T
can be any of the standard MLS proposal types defined in the
proposal
module.
Sourcepub fn retain_custom<F, E>(&mut self, f: F) -> Result<(), E>
pub fn retain_custom<F, E>(&mut self, f: F) -> Result<(), E>
Retain custom proposals in the bundle.
Sourcepub fn retain<F, E>(&mut self, f: F) -> Result<(), E>
pub fn retain<F, E>(&mut self, f: F) -> Result<(), E>
Retain MLS standard proposals in the bundle.
Sourcepub fn iter_proposals(
&self,
) -> impl Iterator<Item = ProposalInfo<BorrowedProposal<'_>>>
pub fn iter_proposals( &self, ) -> impl Iterator<Item = ProposalInfo<BorrowedProposal<'_>>>
Iterate over all proposals inside the bundle.
Sourcepub fn into_proposals(self) -> impl Iterator<Item = ProposalInfo<Proposal>>
pub fn into_proposals(self) -> impl Iterator<Item = ProposalInfo<Proposal>>
Iterate over proposal in the bundle, consuming the bundle.
Sourcepub fn add_proposals(&self) -> &[ProposalInfo<AddProposal>]
pub fn add_proposals(&self) -> &[ProposalInfo<AddProposal>]
Add proposals in the bundle.
Sourcepub fn update_proposals(&self) -> &[ProposalInfo<UpdateProposal>]
pub fn update_proposals(&self) -> &[ProposalInfo<UpdateProposal>]
Update proposals in the bundle.
Sourcepub fn update_proposal_senders(&self) -> &[LeafIndex]
pub fn update_proposal_senders(&self) -> &[LeafIndex]
Senders of update proposals in the bundle.
Sourcepub fn remove_proposals(&self) -> &[ProposalInfo<RemoveProposal>]
pub fn remove_proposals(&self) -> &[ProposalInfo<RemoveProposal>]
Remove proposals in the bundle.
Sourcepub fn psk_proposals(&self) -> &[ProposalInfo<PreSharedKeyProposal>]
pub fn psk_proposals(&self) -> &[ProposalInfo<PreSharedKeyProposal>]
Pre-shared key proposals in the bundle.
Sourcepub fn reinit_proposals(&self) -> &[ProposalInfo<ReInitProposal>]
pub fn reinit_proposals(&self) -> &[ProposalInfo<ReInitProposal>]
Reinit proposals in the bundle.
Sourcepub fn external_init_proposals(&self) -> &[ProposalInfo<ExternalInit>]
pub fn external_init_proposals(&self) -> &[ProposalInfo<ExternalInit>]
External init proposals in the bundle.
Sourcepub fn group_context_ext_proposals(&self) -> &[ProposalInfo<ExtensionList>]
pub fn group_context_ext_proposals(&self) -> &[ProposalInfo<ExtensionList>]
Group context extension proposals in the bundle.
Sourcepub fn custom_proposals(&self) -> &[ProposalInfo<CustomProposal>]
pub fn custom_proposals(&self) -> &[ProposalInfo<CustomProposal>]
Custom proposals in the bundle.
Sourcepub fn custom_proposal_types(&self) -> impl Iterator<Item = ProposalType> + '_
pub fn custom_proposal_types(&self) -> impl Iterator<Item = ProposalType> + '_
Custom proposal types that are in use within this bundle.
Sourcepub fn proposal_types(&self) -> impl Iterator<Item = ProposalType> + '_
pub fn proposal_types(&self) -> impl Iterator<Item = ProposalType> + '_
Standard proposal types that are in use within this bundle.
Trait Implementations§
Source§impl Clone for ProposalBundle
impl Clone for ProposalBundle
Source§fn clone(&self) -> ProposalBundle
fn clone(&self) -> ProposalBundle
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ProposalBundle
impl Debug for ProposalBundle
Source§impl Default for ProposalBundle
impl Default for ProposalBundle
Source§fn default() -> ProposalBundle
fn default() -> ProposalBundle
Source§impl<'a> FromIterator<&'a (ProposalRef, CachedProposal)> for ProposalBundle
impl<'a> FromIterator<&'a (ProposalRef, CachedProposal)> for ProposalBundle
Source§fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = &'a (ProposalRef, CachedProposal)>,
fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = &'a (ProposalRef, CachedProposal)>,
Source§impl<'a> FromIterator<(&'a ProposalRef, &'a CachedProposal)> for ProposalBundle
impl<'a> FromIterator<(&'a ProposalRef, &'a CachedProposal)> for ProposalBundle
Source§fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = (&'a ProposalRef, &'a CachedProposal)>,
fn from_iter<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = (&'a ProposalRef, &'a CachedProposal)>,
Source§impl FromIterator<(Proposal, Sender, ProposalSource)> for ProposalBundle
impl FromIterator<(Proposal, Sender, ProposalSource)> for ProposalBundle
Auto Trait Implementations§
impl Freeze for ProposalBundle
impl RefUnwindSafe for ProposalBundle
impl Send for ProposalBundle
impl Sync for ProposalBundle
impl Unpin for ProposalBundle
impl UnwindSafe for ProposalBundle
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
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>
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>
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