Skip to main content

StagedVcExternalCommitJoin

Struct StagedVcExternalCommitJoin 

Source
pub struct StagedVcExternalCommitJoin { /* private fields */ }
Available on crate feature 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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: Sized + ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V