MemberState

Struct MemberState 

Source
pub struct MemberState<'a, Provider> {
    pub party: PreGroupPartyState<'a, Provider>,
    pub group: MlsGroup,
}
Available on (32-bit or 64-bit) and (crate features test-utils) only.
Expand description

Represents a group member’s MlsGroup instance and pre-group state

Fields§

§party: PreGroupPartyState<'a, Provider>§group: MlsGroup

Implementations§

Source§

impl<Provider: OpenMlsProvider> MemberState<'_, Provider>

Source§

impl<Provider: OpenMlsProvider> MemberState<'_, Provider>

Source

pub fn get_storage_signature_key_pair(&self) -> Option<SignatureKeyPair>

Get member’s SignatureKeyPair if available

Source

pub fn group_storage_state(&self) -> GroupStorageState

Get the GroupStorageState for this group

Source

pub fn deliver_and_apply( &mut self, message: MlsMessageIn, ) -> Result<(), GroupError<Provider>>

Deliver_and_apply a message to this member’s MlsGroup

Source§

impl<'commit_builder, 'b: 'commit_builder, 'a: 'b, Provider> MemberState<'a, Provider>
where Provider: OpenMlsProvider,

Source

pub fn build_commit_and_stage( &'b mut self, f: impl FnOnce(CommitBuilder<'commit_builder, Initial>) -> CommitBuilder<'commit_builder, Initial>, ) -> Result<CommitMessageBundle, GroupError<Provider>>

Build and stage a commit, using the provided closure to add proposals

Source§

impl<'a, Provider: OpenMlsProvider> MemberState<'a, Provider>

Source

pub fn create_from_pre_group( party: PreGroupPartyState<'a, Provider>, mls_group_create_config: MlsGroupCreateConfig, group_id: GroupId, ) -> Result<Self, GroupError<Provider>>

Create a MemberState from a PreGroupPartyState. This creates a new MlsGroup with one member

Source

pub fn join_from_pre_group( party: PreGroupPartyState<'a, Provider>, mls_group_join_config: MlsGroupJoinConfig, welcome: Welcome, tree: Option<RatchetTreeIn>, ) -> Result<Self, GroupError<Provider>>

Create a MemberState from a Welcome, which creates a new MlsGroup using a Welcome invitation from an existing group

Auto Trait Implementations§

§

impl<'a, Provider> Freeze for MemberState<'a, Provider>

§

impl<'a, Provider> RefUnwindSafe for MemberState<'a, Provider>
where Provider: RefUnwindSafe,

§

impl<'a, Provider> Send for MemberState<'a, Provider>
where Provider: Sync,

§

impl<'a, Provider> Sync for MemberState<'a, Provider>
where Provider: Sync,

§

impl<'a, Provider> Unpin for MemberState<'a, Provider>

§

impl<'a, Provider> UnwindSafe for MemberState<'a, Provider>
where Provider: RefUnwindSafe,

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<T> Classify for T

§

type Classified = T

§

fn classify(self) -> T

§

impl<T> Declassify for T

§

type Declassified = T

§

fn declassify(self) -> T

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
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.
§

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

§

fn vzip(self) -> V