pub fn serialize_general_json(
        &self,
        payload: &[u8],
        header: Option<&JweHeaderSet>,
        recipients: &[(Option<&JweHeader>, &dyn JweEncrypter)],
        aad: Option<&[u8]>,
    ) -> Result<String, JoseError> {
        self.serialize_general_json_with_selector(
            payload,
            header,
            recipients
                .iter()
                .map(|(header, _)| header.as_deref())
                .collect::<Vec<Option<&JweHeader>>>()
                .as_slice(),
            aad,
            |i, _header| Some(recipients[i].1),
        )
    }
/// Return a representation of the data that is formatted by flattened json serialization.
///
/// # Arguments
///
/// * `payload` - The payload data.
/// * `header` - The JWE shared protected and unprotected header claims.
/// * `recipients` - The JWE header claims and the JWE encrypter pair for recipients.
/// * `aad` - The JWE additional authenticated data.
Return a representation of the data that is formatted by flattened json serialization.
Return a representation of the data that is formatted by flattened json serialization .
pub fn serialize_general_json(
        &self,
        payload: &[u8],
        header: Option<&JweHeaderSet>,
        recipients: &[(Option<&JweHeader>, &dyn JweEncrypter)],
        aad: Option<&[u8]>,
    ) -> Result<String, JoseError> {
        self.serialize_general_json_with_selector(
            payload,
            header,
            recipients
                .iter()
                .map(|(header, _)| header.as_deref())
                .collect::<Vec<Option<&JweHeader>>>()
                .as_slice(),
            aad,
            |i, _header| Some(recipients[i].1),
        )
    }
pub fn serialize_general_json ( & self , payload : & [ u8 ] , header : Option < & JweHeaderSet > , recipients : & [ ( Option < & JweHeader > , & dyn JweEncrypter ) ] , aad : Option < & [ u8 ] > , ) -> Result < String , JoseError > { self . serialize_general_json_with_selector ( payload , header , recipients . iter ( ) . map ( | ( header , _ ) | header . as_deref ( ) ) . collect :: < Vec < Option < & JweHeader > > > ( ) . as_slice ( ) , aad , | i , _header | Some ( recipients [ i ] . 1 ) , ) }
Return a representation of the data that is formatted by flattened json serialization.
Return a representation of the data that is formatted by flattened json serialization .
&self
payload
&[u8]
header
Option<&JweHeaderSet>
recipients
&[(Option<&JweHeader>, &dyn JweEncrypter)]
aad
Option<&[u8]>
&self
payload
&[u8]
header
Option<&JweHeaderSet>
recipients
&[(Option<&JweHeader>, &dyn JweEncrypter)]
aad
Option<&[u8]>