For cases where the payload of a Jwe is not JSON and the raw payload is needed for additional processing, it would be nice if there were a way to take the owned payload from a Jwe instance. Perhaps something like:
/// Turns this [`Jwe`] into an owned header and payload.
pub fn into_parts(self) -> (JweProtectedHeader, Vec<u8>) {
(self.header, self.payload)
}
For cases where the payload of a
Jweis not JSON and the raw payload is needed for additional processing, it would be nice if there were a way to take the owned payload from aJweinstance. Perhaps something like: