pub struct StagedVcExternalCommitJoin { /* private fields */ }virtual-clients-draft and (32-bit or 64-bit) only.Expand description
A verified sibling external commit, ready to be joined. Returned by
VcExternalCommitJoinBuilder::process_commit.
The commit’s signature has been verified against the prior-epoch group,
so the proposals exposed here are authenticated. If the commit covers
AppDataUpdate proposals, the application must interpret them (with the
help of Self::app_data_dictionary_updater) and supply the resulting
AppDataUpdates via Self::with_app_data_dictionary_updates before
calling Self::into_group, exactly as it would for
MlsGroup::resolve_app_data_commit when processing the same commit as
a member.
Dropping this value discards the join. No operation secret generation is
consumed before Self::into_group, so a discarded join can be started
over by processing the same commit again.
Implementations§
Source§impl StagedVcExternalCommitJoin
impl StagedVcExternalCommitJoin
Sourcepub fn prior_group_context(&self) -> &GroupContext
pub fn prior_group_context(&self) -> &GroupContext
Returns the GroupContext of the group at the epoch before the
external commit. The commit’s changes (including any AppDataUpdate
proposals) are not applied to it. The joined group’s context is
available on the MlsGroup returned by Self::into_group.
Sourcepub fn prior_members(&self) -> impl Iterator<Item = Member> + '_
pub fn prior_members(&self) -> impl Iterator<Item = Member> + '_
Returns an iterator over the Members of the group at the epoch
before the external commit. The commit’s changes are not applied:
the committing sibling’s virtual-client leaf is absent and members
the commit inline-removes are still present.
Sourcepub fn app_data_update_proposals(
&self,
) -> impl Iterator<Item = &AppDataUpdateProposal>
pub fn app_data_update_proposals( &self, ) -> impl Iterator<Item = &AppDataUpdateProposal>
Returns the AppDataUpdate proposals covered by the commit, sorted by
component id. The application interprets them to compute the
AppDataUpdates that Self::into_group requires.
Sourcepub fn app_ephemeral_proposals_for_component_id(
&self,
component_id: ComponentId,
) -> impl Iterator<Item = &AppEphemeralProposal>
pub fn app_ephemeral_proposals_for_component_id( &self, component_id: ComponentId, ) -> impl Iterator<Item = &AppEphemeralProposal>
Returns the AppEphemeral proposals for component_id that the commit
carries by value, in the order they appear in the commit, for example
to decide how to follow the join. Unlike
PublicMessageIn::unverified_app_ephemeral_proposals, the returned
data is authenticated: the commit’s signature has been verified.
Sourcepub fn app_data_dictionary_updater(&self) -> AppDataDictionaryUpdater<'_>
pub fn app_data_dictionary_updater(&self) -> AppDataDictionaryUpdater<'_>
Returns a helper for computing the AppDataUpdates, seeded with
the app data dictionary of the prior-epoch group context.
Sourcepub fn with_app_data_dictionary_updates(
&mut self,
app_data_updates: Option<AppDataUpdates>,
)
pub fn with_app_data_dictionary_updates( &mut self, app_data_updates: Option<AppDataUpdates>, )
Sets the AppDataUpdates that contain the changes made by the
commit’s AppDataUpdate proposals. Updates must be set exactly when
the commit covers AppDataUpdate proposals.
Sourcepub fn into_group<Provider: OpenMlsProvider>(
self,
provider: &Provider,
) -> Result<MlsGroup, VcExternalCommitJoinError<Provider::StorageError>>
pub fn into_group<Provider: OpenMlsProvider>( self, provider: &Provider, ) -> Result<MlsGroup, VcExternalCommitJoinError<Provider::StorageError>>
Completes the join and returns the joined MlsGroup. If the commit
covers AppDataUpdate proposals, the resolved updates must have been
set via Self::with_app_data_dictionary_updates. Absent updates
are rejected before the consume-once operation secret generation is
spent, so the join can be started over. Updates that do not reproduce
the committing sibling’s dictionary fail with a confirmation tag
mismatch after the generation is consumed, so they should be computed
deterministically from the proposals rather than guessed.
Auto Trait Implementations§
impl Freeze for StagedVcExternalCommitJoin
impl RefUnwindSafe for StagedVcExternalCommitJoin
impl Send for StagedVcExternalCommitJoin
impl Sync for StagedVcExternalCommitJoin
impl Unpin for StagedVcExternalCommitJoin
impl UnsafeUnpin for StagedVcExternalCommitJoin
impl UnwindSafe for StagedVcExternalCommitJoin
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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