pub struct PackOptions {
pub security_mode: SecurityMode,
pub recipient_kid: Option<String>,
pub sender_kid: Option<String>,
}Expand description
Options for packing a message
Fields§
§security_mode: SecurityModeSecurity mode to use
recipient_kid: Option<String>Key ID of the recipient (for JWE)
sender_kid: Option<String>Key ID of the sender (for JWS and JWE)
Implementations§
Source§impl PackOptions
impl PackOptions
Sourcepub fn with_plain(self) -> Self
pub fn with_plain(self) -> Self
Set to use plain mode (no security)
Sourcepub fn with_sign(self, sender_kid: &str) -> Self
pub fn with_sign(self, sender_kid: &str) -> Self
Set to use signed mode with the given sender key ID
Sourcepub fn with_auth_crypt(self, sender_kid: &str, recipient_jwk: &Value) -> Self
pub fn with_auth_crypt(self, sender_kid: &str, recipient_jwk: &Value) -> Self
Set to use auth-crypt mode with the given sender and recipient key IDs
Sourcepub fn security_mode(&self) -> SecurityMode
pub fn security_mode(&self) -> SecurityMode
Get the security mode
Trait Implementations§
Source§impl Clone for PackOptions
impl Clone for PackOptions
Source§fn clone(&self) -> PackOptions
fn clone(&self) -> PackOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PackOptions
impl Debug for PackOptions
Auto Trait Implementations§
impl Freeze for PackOptions
impl RefUnwindSafe for PackOptions
impl Send for PackOptions
impl Sync for PackOptions
impl Unpin for PackOptions
impl UnsafeUnpin for PackOptions
impl UnwindSafe for PackOptions
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