pub struct JweHeaderSet { /* private fields */ }Expand description
Represent JWE protected and unprotected header claims
Implementations§
Source§impl JweHeaderSet
impl JweHeaderSet
Sourcepub fn set_algorithm(&mut self, value: impl Into<String>, protection: bool)
pub fn set_algorithm(&mut self, value: impl Into<String>, protection: bool)
Set a value for algorithm header claim (alg).
§Arguments
value- a algorithmprotection- If it dosen’t need protection, set false.
Sourcepub fn set_content_encryption(
&mut self,
value: impl Into<String>,
protection: bool,
)
pub fn set_content_encryption( &mut self, value: impl Into<String>, protection: bool, )
Set a value for content encryption header claim (enc).
§Arguments
value- a content encryptionprotection- If it dosen’t need protection, set false.
Sourcepub fn content_encryption(&self) -> Option<&str>
pub fn content_encryption(&self) -> Option<&str>
Return the value for content encryption header claim (enc).
Sourcepub fn set_compression(&mut self, value: impl Into<String>)
pub fn set_compression(&mut self, value: impl Into<String>)
Sourcepub fn compression(&self) -> Option<&str>
pub fn compression(&self) -> Option<&str>
Return the value for compression header claim (zip).
Sourcepub fn set_jwk_set_url(&mut self, value: impl Into<String>, protection: bool)
pub fn set_jwk_set_url(&mut self, value: impl Into<String>, protection: bool)
Sourcepub fn jwk_set_url(&self) -> Option<&str>
pub fn jwk_set_url(&self) -> Option<&str>
Return the value for JWK set URL header claim (jku).
Sourcepub fn set_x509_url(&mut self, value: impl Into<String>, protection: bool)
pub fn set_x509_url(&mut self, value: impl Into<String>, protection: bool)
Sourcepub fn set_x509_certificate_chain(
&mut self,
values: &Vec<impl AsRef<[u8]>>,
protection: bool,
)
pub fn set_x509_certificate_chain( &mut self, values: &Vec<impl AsRef<[u8]>>, protection: bool, )
Set values for X.509 certificate chain header claim (x5c).
§Arguments
values- X.509 certificate chain
Sourcepub fn x509_certificate_chain(&self) -> Option<Vec<Vec<u8>>>
pub fn x509_certificate_chain(&self) -> Option<Vec<Vec<u8>>>
Return values for a X.509 certificate chain header claim (x5c).
Sourcepub fn set_x509_certificate_sha1_thumbprint(
&mut self,
value: impl AsRef<[u8]>,
protection: bool,
)
pub fn set_x509_certificate_sha1_thumbprint( &mut self, value: impl AsRef<[u8]>, protection: bool, )
Set a value for X.509 certificate SHA-1 thumbprint header claim (x5t).
§Arguments
value- A X.509 certificate SHA-1 thumbprint
Sourcepub fn x509_certificate_sha1_thumbprint(&self) -> Option<Vec<u8>>
pub fn x509_certificate_sha1_thumbprint(&self) -> Option<Vec<u8>>
Return the value for X.509 certificate SHA-1 thumbprint header claim (x5t).
Sourcepub fn set_x509_certificate_sha256_thumbprint(
&mut self,
value: impl AsRef<[u8]>,
protection: bool,
)
pub fn set_x509_certificate_sha256_thumbprint( &mut self, value: impl AsRef<[u8]>, protection: bool, )
Set a value for a x509 certificate SHA-256 thumbprint header claim (x5t#S256).
§Arguments
value- A x509 certificate SHA-256 thumbprint
Sourcepub fn x509_certificate_sha256_thumbprint(&self) -> Option<Vec<u8>>
pub fn x509_certificate_sha256_thumbprint(&self) -> Option<Vec<u8>>
Return the value for X.509 certificate SHA-256 thumbprint header claim (x5t#S256).
Sourcepub fn set_key_id(&mut self, value: impl Into<String>, protection: bool)
pub fn set_key_id(&mut self, value: impl Into<String>, protection: bool)
Sourcepub fn set_token_type(&mut self, value: impl Into<String>, protection: bool)
pub fn set_token_type(&mut self, value: impl Into<String>, protection: bool)
Sourcepub fn token_type(&self) -> Option<&str>
pub fn token_type(&self) -> Option<&str>
Return the value for token type header claim (typ).
Sourcepub fn set_content_type(&mut self, value: impl Into<String>, protection: bool)
pub fn set_content_type(&mut self, value: impl Into<String>, protection: bool)
Sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
Return the value for content type header claim (cty).
Sourcepub fn set_critical(&mut self, values: &Vec<impl AsRef<str>>)
pub fn set_critical(&mut self, values: &Vec<impl AsRef<str>>)
Sourcepub fn set_agreement_partyuinfo(
&mut self,
value: impl AsRef<[u8]>,
protection: bool,
)
pub fn set_agreement_partyuinfo( &mut self, value: impl AsRef<[u8]>, protection: bool, )
Set a value for a agreement PartyUInfo header claim (apu).
§Arguments
value- A agreement PartyUInfo
Sourcepub fn agreement_partyuinfo(&self) -> Option<Vec<u8>>
pub fn agreement_partyuinfo(&self) -> Option<Vec<u8>>
Return the value for agreement PartyUInfo header claim (apu).
Sourcepub fn set_agreement_partyvinfo(
&mut self,
value: impl AsRef<[u8]>,
protection: bool,
)
pub fn set_agreement_partyvinfo( &mut self, value: impl AsRef<[u8]>, protection: bool, )
Set a value for a agreement PartyVInfo header claim (apv).
§Arguments
value- A agreement PartyVInfo
Sourcepub fn agreement_partyvinfo(&self) -> Option<Vec<u8>>
pub fn agreement_partyvinfo(&self) -> Option<Vec<u8>>
Return the value for agreement PartyVInfo header claim (apv).
Sourcepub fn set_issuer(&mut self, value: impl Into<String>, protection: bool)
pub fn set_issuer(&mut self, value: impl Into<String>, protection: bool)
Sourcepub fn set_subject(&mut self, value: impl Into<String>, protection: bool)
pub fn set_subject(&mut self, value: impl Into<String>, protection: bool)
pub fn set_claim( &mut self, key: &str, value: Option<Value>, protection: bool, ) -> Result<(), JoseError>
Sourcepub fn claims_set(&self, protection: bool) -> &Map<String, Value>
pub fn claims_set(&self, protection: bool) -> &Map<String, Value>
Return values for header claims set
pub fn to_map(&self) -> Map<String, Value>
Trait Implementations§
Source§impl Clone for JweHeaderSet
impl Clone for JweHeaderSet
Source§fn clone(&self) -> JweHeaderSet
fn clone(&self) -> JweHeaderSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for JweHeaderSet
impl Debug for JweHeaderSet
Source§impl Deref for JweHeaderSet
impl Deref for JweHeaderSet
Source§impl Display for JweHeaderSet
impl Display for JweHeaderSet
impl Eq for JweHeaderSet
Source§impl JoseHeader for JweHeaderSet
impl JoseHeader for JweHeaderSet
Source§impl PartialEq for JweHeaderSet
impl PartialEq for JweHeaderSet
Source§fn eq(&self, other: &JweHeaderSet) -> bool
fn eq(&self, other: &JweHeaderSet) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for JweHeaderSet
Auto Trait Implementations§
impl Freeze for JweHeaderSet
impl RefUnwindSafe for JweHeaderSet
impl Send for JweHeaderSet
impl Sync for JweHeaderSet
impl Unpin for JweHeaderSet
impl UnsafeUnpin for JweHeaderSet
impl UnwindSafe for JweHeaderSet
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.