pub struct Jws {
pub payload: String,
pub signatures: Vec<JwsSignature>,
}Expand description
JWS (JSON Web Signature) supporting both General and Flattened serializations per RFC 7515.
When serializing:
- Single signature: uses Flattened JWS format (
protected,payload,signatureat top level) - Multiple signatures: uses General JWS format (
payload,signaturesarray)
When deserializing: accepts both formats.
Fields§
§payload: String§signatures: Vec<JwsSignature>Trait Implementations§
Source§impl<'de> Deserialize<'de> for Jws
impl<'de> Deserialize<'de> for Jws
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: DeserializeOwned + Send + 'static> Unpackable<Jws, T> for Jws
Implement Unpackable for JWS
impl<T: DeserializeOwned + Send + 'static> Unpackable<Jws, T> for Jws
Implement Unpackable for JWS
Source§fn unpack<'life0, 'life1, 'async_trait>(
packed_message: &'life0 Jws,
key_manager: &'life1 (impl 'async_trait + KeyManagerPacking + ?Sized),
_options: UnpackOptions,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
fn unpack<'life0, 'life1, 'async_trait>(
packed_message: &'life0 Jws,
key_manager: &'life1 (impl 'async_trait + KeyManagerPacking + ?Sized),
_options: UnpackOptions,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Unpack the object from its secure format
Source§impl Unpackable<Jws, UnpackedMessage> for Jws
Implement Unpackable for JWS to UnpackedMessage
impl Unpackable<Jws, UnpackedMessage> for Jws
Implement Unpackable for JWS to UnpackedMessage
Source§fn unpack<'life0, 'life1, 'async_trait>(
packed_message: &'life0 Jws,
key_manager: &'life1 (impl 'async_trait + KeyManagerPacking + ?Sized),
options: UnpackOptions,
) -> Pin<Box<dyn Future<Output = Result<UnpackedMessage>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
fn unpack<'life0, 'life1, 'async_trait>(
packed_message: &'life0 Jws,
key_manager: &'life1 (impl 'async_trait + KeyManagerPacking + ?Sized),
options: UnpackOptions,
) -> Pin<Box<dyn Future<Output = Result<UnpackedMessage>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Unpack the object from its secure format
Auto Trait Implementations§
impl Freeze for Jws
impl RefUnwindSafe for Jws
impl Send for Jws
impl Sync for Jws
impl Unpin for Jws
impl UnsafeUnpin for Jws
impl UnwindSafe for Jws
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more