pub struct PublicGroup { /* private fields */ }
Expand description

This struct holds all public values of an MLS group.

Implementations§

source§

impl PublicGroup

source

pub fn process_message( &self, backend: &impl OpenMlsCryptoProvider, message: impl Into<ProtocolMessage> ) -> Result<ProcessedMessage, ProcessMessageError>

This function is used to parse messages from the DS. It checks for syntactic errors and does semantic validation as well. It returns a ProcessedMessage enum. Checks the following semantic validation:

  • ValSem002
  • ValSem003
  • ValSem004
  • ValSem005
  • ValSem006
  • ValSem007
  • ValSem008
  • ValSem009
  • ValSem010
  • ValSem101
  • ValSem102
  • ValSem104
  • ValSem106
  • ValSem107
  • ValSem108
  • ValSem110
  • ValSem111
  • ValSem112
  • ValSem200
  • ValSem201
  • ValSem202: Path must be the right length
  • ValSem203: Path secrets must decrypt correctly
  • ValSem204: Public keys from Path must be verified and match the private keys from the direct path
  • ValSem205
  • ValSem240
  • ValSem241
  • ValSem242
  • ValSem243
  • ValSem244
  • ValSem245
  • ValSem246 (as part of ValSem010)
source§

impl PublicGroup

source

pub fn merge_commit(&mut self, staged_commit: StagedCommit)

Merges a StagedCommit into the public group state.

This function should not fail and only returns a Result, because it might throw a LibraryError.

source§

impl PublicGroup

source

pub fn from_external( backend: &impl OpenMlsCryptoProvider, ratchet_tree: RatchetTreeIn, verifiable_group_info: VerifiableGroupInfo, proposal_store: ProposalStore ) -> Result<(Self, GroupInfo), CreationFromExternalError>

Create a PublicGroup instance to start tracking an existing MLS group.

This function performs basic validation checks and returns an error if one of the checks fails. See CreationFromExternalError for more details.

source

pub fn ext_commit_sender_index( &self, commit: &StagedCommit ) -> Result<LeafNodeIndex, LibraryError>

Returns the index of the sender of a staged, external commit.

source

pub fn members(&self) -> impl Iterator<Item = Member> + '_

Get an iterator over all Members of this PublicGroup.

source

pub fn export_ratchet_tree(&self) -> RatchetTree

Export the nodes of the public tree.

source

pub fn add_proposal(&mut self, proposal: QueuedProposal)

Add the QueuedProposal to the PublicGroups internal ProposalStore.

source§

impl PublicGroup

source

pub fn ciphersuite(&self) -> Ciphersuite

Get the ciphersuite.

source

pub fn version(&self) -> ProtocolVersion

Get the version.

source

pub fn group_id(&self) -> &GroupId

Get the group id.

source

pub fn group_context(&self) -> &GroupContext

Get the group context.

source

pub fn required_capabilities(&self) -> Option<&RequiredCapabilitiesExtension>

Get the required capabilities.

source

pub fn confirmation_tag(&self) -> &ConfirmationTag

Get confirmation tag.

source

pub fn leaf(&self, leaf_index: LeafNodeIndex) -> Option<&LeafNode>

Return a reference to the leaf at the given LeafNodeIndex or None if the leaf is blank.

Trait Implementations§

source§

impl Debug for PublicGroup

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for PublicGroup

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for PublicGroup

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

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, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,