#[non_exhaustive]pub struct CavageHeaderParams {
pub key_id: String,
pub algorithm: Option<String>,
pub headers: CavageHeaderSet,
pub signature: String,
pub created: Option<i64>,
pub expires: Option<i64>,
}Expand description
Parsed Signature: header parameters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.key_id: StringReference to the public key to verify against.
algorithm: Option<String>Algorithm hint; None means “detect from the key itself”.
headers: CavageHeaderSetWhich headers participate in the signature base string.
signature: StringBase64-encoded signature bytes.
created: Option<i64>Optional (created) timestamp in seconds since the UNIX epoch.
expires: Option<i64>Optional (expires) timestamp in seconds since the UNIX epoch.
Implementations§
Source§impl CavageHeaderParams
impl CavageHeaderParams
Sourcepub fn parse(raw: &str) -> Result<Self, Error>
pub fn parse(raw: &str) -> Result<Self, Error>
Parses the raw Signature: header value.
§Errors
Returns Error::MalformedSignatureHeader if the parameter list
cannot be decoded, and Error::MissingSignatureParameter if
keyId or signature is absent.
Sourcepub fn to_header_value(&self) -> String
pub fn to_header_value(&self) -> String
Serialises back into a Signature: header value.
String-valued parameters (keyId, algorithm, headers,
signature) are quoted and any \ or " character inside
them is backslash-escaped per the Cavage quoted-string grammar.
Trait Implementations§
Source§impl Clone for CavageHeaderParams
impl Clone for CavageHeaderParams
Source§fn clone(&self) -> CavageHeaderParams
fn clone(&self) -> CavageHeaderParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CavageHeaderParams
impl Debug for CavageHeaderParams
Source§impl PartialEq for CavageHeaderParams
impl PartialEq for CavageHeaderParams
impl Eq for CavageHeaderParams
impl StructuralPartialEq for CavageHeaderParams
Auto Trait Implementations§
impl Freeze for CavageHeaderParams
impl RefUnwindSafe for CavageHeaderParams
impl Send for CavageHeaderParams
impl Sync for CavageHeaderParams
impl Unpin for CavageHeaderParams
impl UnsafeUnpin for CavageHeaderParams
impl UnwindSafe for CavageHeaderParams
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.