pub fn self_update(
        &self,
        action_type: ActionType,
        group_id: &GroupId,
        key_package_bundle_option: Option<KeyPackageBundle>,
    ) -> Result<(MlsMessageOut, Option<Welcome>), ClientError> {
        let mut groups = self.groups.borrow_mut();
        let group = groups
            .get_mut(group_id)
            .ok_or(ClientError::NoMatchingGroup)?;
        let action_results = match action_type {
            ActionType::Commit => group.self_update(&self.crypto, key_package_bundle_option)?,
            ActionType::Proposal => (
                group.propose_self_update(&self.crypto, key_package_bundle_option)?,
                None,
            ),
        };
        Ok(action_results)
    }
/// Have the client either propose or commit (depending on the
/// `action_type`) a self update in the group with the given group id.
/// Optionally, a `KeyPackageBundle` can be provided, which the client will
/// update their leaf with. Returns an error if no group with the given
/// group id can be found or if an error occurs while creating the update.
Have the client either propose or commit (depending on the
`action_type`) a self update in the group with the given group id.
Optionally, a `KeyPackageBundle` can be provided, which the client will
update their leaf with. Returns an error if no group with the given
group id can be found or if an error occurs while creating the update.
Have the client either propose or commit ( depending on the ` action_type ` ) a self update in the group with the given group id . Optionally a ` KeyPackageBundle ` can be provided which the client will update their leaf with . Returns an error if no group with the given group id can be found or if an error occurs while creating the update .
pub fn self_update(
        &self,
        action_type: ActionType,
        group_id: &GroupId,
        key_package_bundle_option: Option<KeyPackageBundle>,
    ) -> Result<(MlsMessageOut, Option<Welcome>), ClientError> {
        let mut groups = self.groups.borrow_mut();
        let group = groups
            .get_mut(group_id)
            .ok_or(ClientError::NoMatchingGroup)?;
        let action_results = match action_type {
            ActionType::Commit => group.self_update(&self.crypto, key_package_bundle_option)?,
            ActionType::Proposal => (
                group.propose_self_update(&self.crypto, key_package_bundle_option)?,
                None,
            ),
        };
        Ok(action_results)
    }
pub fn self_update ( & self , action_type : ActionType , group_id : & GroupId , key_package_bundle_option : Option < KeyPackageBundle > , ) -> Result < ( MlsMessageOut , Option < Welcome > ) , ClientError > { let mut groups = self . groups . borrow_mut ( ) ; let group = groups . get_mut ( group_id ) . ok_or ( ClientError :: NoMatchingGroup ) ? ; let action_results = match action_type { ActionType :: Commit => group . self_update ( & self . crypto , key_package_bundle_option ) ? , ActionType :: Proposal => ( group . propose_self_update ( & self . crypto , key_package_bundle_option ) ? , None , ) , } ; Ok ( action_results ) }
Have the client either propose or commit (depending on the
`action_type`) a self update in the group with the given group id.
Have the client either propose or commit ( depending on the ` action_type ` ) a self update in the group with the given group id .
&self
action_type
ActionType
group_id
&GroupId
key_package_bundle_option
Option<KeyPackageBundle>
&self
action_type
ActionType
group_id
&GroupId
key_package_bundle_option
Option<KeyPackageBundle>