Struct didcomm_rs::JwmHeader
source · [−]pub struct JwmHeader {
pub typ: MessageType,
pub enc: Option<String>,
pub kid: Option<String>,
pub skid: Option<String>,
pub alg: Option<String>,
pub jku: Option<String>,
pub jwk: Option<Jwk>,
pub epk: Option<Jwk>,
pub cty: Option<String>,
}
Expand description
JWM Header as specified in RFC With single deviation - allows raw text JWM to support DIDComm spec
Designed to work for both JWE and JWS message types.
iv
property is not explicitly listed in the registered properties on the RFC but is present
within example lists - used here as DIDComm crypto nonce sharing property.
Fields
typ: MessageType
enc: Option<String>
kid: Option<String>
skid: Option<String>
alg: Option<String>
jku: Option<String>
jwk: Option<Jwk>
epk: Option<Jwk>
cty: Option<String>
Implementations
sourceimpl JwmHeader
impl JwmHeader
sourcepub fn as_signed(&mut self, alg: &SignatureAlgorithm)
pub fn as_signed(&mut self, alg: &SignatureAlgorithm)
Setter of JOSE header properties to identify which signature alg used.
Modifies typ
and alg
headers.
sourcepub fn as_encrypted(&mut self, alg: &CryptoAlgorithm)
pub fn as_encrypted(&mut self, alg: &CryptoAlgorithm)
Setter of JOSE header properties to identify which crypto alg and key type used.
Modifies enc
, typ
and alg
headers.
pub fn kid(&mut self, kid: Option<String>)
Trait Implementations
sourceimpl<'de> Deserialize<'de> for JwmHeader
impl<'de> Deserialize<'de> for JwmHeader
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for JwmHeader
Auto Trait Implementations
impl RefUnwindSafe for JwmHeader
impl Send for JwmHeader
impl Sync for JwmHeader
impl Unpin for JwmHeader
impl UnwindSafe for JwmHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more