pub(crate) fn from_mls_plaintext(
        ciphersuite: &Ciphersuite,
        backend: &impl OpenMlsCryptoProvider,
        mls_plaintext: &'a MlsPlaintext,
    ) -> Result<Self, QueuedProposalError> {
        debug_assert!(mls_plaintext.content_type() == &ContentType::Proposal);
        let proposal = match mls_plaintext.content() {
            MlsPlaintextContentType::Proposal(p) => p,
            _ => return Err(QueuedProposalError::WrongContentType),
        };
        let proposal_reference = ProposalReference::from_proposal(ciphersuite, backend, proposal)?;
        Ok(Self {
            proposal,
            proposal_reference,
            sender: *mls_plaintext.sender(),
            proposal_or_ref_type: ProposalOrRefType::Reference,
        })
    }
/// Creates a new `QueuedProposal` from an `MlsPlaintext`
Creates a new `QueuedProposal` from an `MlsPlaintext`
Creates a new ` QueuedProposal ` from an ` MlsPlaintext `
pub(crate) fn from_mls_plaintext(
        ciphersuite: &Ciphersuite,
        backend: &impl OpenMlsCryptoProvider,
        mls_plaintext: &'a MlsPlaintext,
    ) -> Result<Self, QueuedProposalError> {
        debug_assert!(mls_plaintext.content_type() == &ContentType::Proposal);
        let proposal = match mls_plaintext.content() {
            MlsPlaintextContentType::Proposal(p) => p,
            _ => return Err(QueuedProposalError::WrongContentType),
        };
        let proposal_reference = ProposalReference::from_proposal(ciphersuite, backend, proposal)?;
        Ok(Self {
            proposal,
            proposal_reference,
            sender: *mls_plaintext.sender(),
            proposal_or_ref_type: ProposalOrRefType::Reference,
        })
    }
pub ( crate ) fn from_mls_plaintext ( ciphersuite : & Ciphersuite , backend : & impl OpenMlsCryptoProvider , mls_plaintext : & ' a MlsPlaintext , ) -> Result < Self , QueuedProposalError > { debug_assert ! ( mls_plaintext content_type ( ) ContentType Proposal ) ; let proposal = match mls_plaintext . content ( ) { MlsPlaintextContentType :: Proposal ( p ) => p , _ => return Err ( QueuedProposalError :: WrongContentType ) , } ; let proposal_reference = ProposalReference :: from_proposal ( ciphersuite , backend , proposal ) ? ; Ok ( Self { proposal , proposal_reference , sender : * mls_plaintext . sender ( ) , proposal_or_ref_type : ProposalOrRefType :: Reference , } ) }
Creates a new `QueuedProposal` from an `MlsPlaintext`
Creates a new ` QueuedProposal ` from an ` MlsPlaintext `
ciphersuite
&Ciphersuite
backend
&impl OpenMlsCryptoProvider
mls_plaintext
&'a MlsPlaintext
ciphersuite
&Ciphersuite
backend
&impl OpenMlsCryptoProvider
mls_plaintext
&'a MlsPlaintext