pub fn deliver_welcome(&self, welcome: Welcome, group: &Group) -> Result<(), SetupError> {
        // Serialize and de-serialize the Welcome if the bit was set.
        let welcome = match self.use_codec {
            CodecUse::SerializedMessages => {
                let serialized_welcome = welcome
                    .tls_serialize_detached()
                    .map_err(|e| ClientError::TlsCodecError(e))?;
                Welcome::tls_deserialize(&mut serialized_welcome.as_slice())
                    .map_err(|e| ClientError::TlsCodecError(e))?
            }
            CodecUse::StructMessages => welcome,
        };
        if self.use_codec == CodecUse::SerializedMessages {}
        let clients = self.clients.borrow();
        for egs in welcome.secrets() {
            let client_id = self
                .waiting_for_welcome
                .borrow_mut()
                .remove(egs.key_package_hash.as_slice())
                .ok_or(SetupError::NoFreshKeyPackage)?;
            let client = clients.get(&client_id).unwrap().borrow();
            client.join_group(
                group.group_config.clone(),
                welcome.clone(),
                Some(group.public_tree.clone()),
            )?;
        }
        Ok(())
    }
/// Deliver a Welcome message to the intended recipients. It uses the given
/// group `group` to obtain the current public tree of the group. Note, that
/// this tree only exists if `distribute_to_members` was previously used to
/// distribute the commit adding the members to the group. This function
/// will throw an error if no key package was previously created for the
/// client by `get_fresh_key_package`.
Deliver a Welcome message to the intended recipients. It uses the given
group `group` to obtain the current public tree of the group. Note, that
this tree only exists if `distribute_to_members` was previously used to
distribute the commit adding the members to the group. This function
will throw an error if no key package was previously created for the
client by `get_fresh_key_package`.
Deliver a Welcome message to the intended recipients . It uses the given group ` group ` to obtain the current public tree of the group . Note that this tree only exists if ` distribute_to_members ` was previously used to distribute the commit adding the members to the group . This function will throw an error if no key package was previously created for the client by ` get_fresh_key_package ` .
pub fn deliver_welcome(&self, welcome: Welcome, group: &Group) -> Result<(), SetupError> {
        // Serialize and de-serialize the Welcome if the bit was set.
        let welcome = match self.use_codec {
            CodecUse::SerializedMessages => {
                let serialized_welcome = welcome
                    .tls_serialize_detached()
                    .map_err(|e| ClientError::TlsCodecError(e))?;
                Welcome::tls_deserialize(&mut serialized_welcome.as_slice())
                    .map_err(|e| ClientError::TlsCodecError(e))?
            }
            CodecUse::StructMessages => welcome,
        };
        if self.use_codec == CodecUse::SerializedMessages {}
        let clients = self.clients.borrow();
        for egs in welcome.secrets() {
            let client_id = self
                .waiting_for_welcome
                .borrow_mut()
                .remove(egs.key_package_hash.as_slice())
                .ok_or(SetupError::NoFreshKeyPackage)?;
            let client = clients.get(&client_id).unwrap().borrow();
            client.join_group(
                group.group_config.clone(),
                welcome.clone(),
                Some(group.public_tree.clone()),
            )?;
        }
        Ok(())
    }
pub fn deliver_welcome ( & self , welcome : Welcome , group : & Group ) -> Result < ( ) , SetupError > { // Serialize and de-serialize the Welcome if the bit was set. let welcome = match self . use_codec { CodecUse :: SerializedMessages => { let serialized_welcome = welcome . tls_serialize_detached ( ) . map_err ( | e | ClientError :: TlsCodecError ( e ) ) ? ; Welcome :: tls_deserialize ( & mut serialized_welcome . as_slice ( ) ) . map_err ( | e | ClientError :: TlsCodecError ( e ) ) ? } CodecUse :: StructMessages => welcome , } ; if self . use_codec == CodecUse :: SerializedMessages { } let clients = self . clients . borrow ( ) ; for egs in welcome . secrets ( ) { let client_id = self . waiting_for_welcome . borrow_mut ( ) . remove ( egs . key_package_hash . as_slice ( ) ) . ok_or ( SetupError :: NoFreshKeyPackage ) ? ; let client = clients . get ( & client_id ) . unwrap ( ) . borrow ( ) ; client . join_group ( group . group_config . clone ( ) , welcome . clone ( ) , Some ( group . public_tree . clone ( ) ) , ) ? ; } Ok ( ( ) ) }
Deliver a Welcome message to the intended recipients.
Deliver a Welcome message to the intended recipients .
&self
welcome
Welcome
group
&Group
&self
welcome
Welcome
group
&Group