pub struct ProtectedHeader<KI> { /* private fields */ }Expand description
The signed header values for the JWS which are common to each request.
RFC 8885 only supports “Protected” / “Registered” headers, and only a subset of those fields.
Fields which are None are left out of the protected header.
The parameter KI is the key identifier, which must be serializable as
JSON, but is otherwise unconstrained.
Implementations§
Source§impl<KI> ProtectedHeader<KI>
impl<KI> ProtectedHeader<KI>
Source§impl<'k> ProtectedHeader<&'k AccountKeyIdentifier>
impl<'k> ProtectedHeader<&'k AccountKeyIdentifier>
Sourcepub fn new_acme_header(
key: &'k SigningKey,
url: Url,
nonce: Nonce,
) -> AcmeProtectedHeader<'k>
pub fn new_acme_header( key: &'k SigningKey, url: Url, nonce: Nonce, ) -> AcmeProtectedHeader<'k>
Create a new protected header based on a signing key without an account identifier.
Sourcepub fn new_acme_account_header(
account: &'k AccountKeyIdentifier,
url: Url,
nonce: Nonce,
) -> AcmeProtectedHeader<'k>
pub fn new_acme_account_header( account: &'k AccountKeyIdentifier, url: Url, nonce: Nonce, ) -> AcmeProtectedHeader<'k>
Create a new protected header based on an account identifier.
Trait Implementations§
Source§impl<KI> AcmeFormat for ProtectedHeader<KI>where
KI: Serialize,
impl<KI> AcmeFormat for ProtectedHeader<KI>where
KI: Serialize,
Source§fn fmt<W: Write>(&self, f: &mut IndentWriter<'_, W>) -> Result
fn fmt<W: Write>(&self, f: &mut IndentWriter<'_, W>) -> Result
Write this format at the current indentation.
Source§fn fmt_indented<W: Write>(&self, f: &mut IndentWriter<'_, W>) -> Result
fn fmt_indented<W: Write>(&self, f: &mut IndentWriter<'_, W>) -> Result
Write this format at an indented level one greater than the current level. Read more
Source§fn fmt_indented_skip_first<W: Write>(
&self,
f: &mut IndentWriter<'_, W>,
) -> Result
fn fmt_indented_skip_first<W: Write>( &self, f: &mut IndentWriter<'_, W>, ) -> Result
Write this format at an indented level one greater than the current level,
but don’t indent the first line.
Source§fn formatted(&self) -> AcmeFormatted<'_, Self>
fn formatted(&self) -> AcmeFormatted<'_, Self>
Return a formatting proxy which will use the ACME format when used with
std::fmt::Display.Source§impl<KI: Clone> Clone for ProtectedHeader<KI>
impl<KI: Clone> Clone for ProtectedHeader<KI>
Source§fn clone(&self) -> ProtectedHeader<KI>
fn clone(&self) -> ProtectedHeader<KI>
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<KI: Debug> Debug for ProtectedHeader<KI>
impl<KI: Debug> Debug for ProtectedHeader<KI>
Auto Trait Implementations§
impl<KI> Freeze for ProtectedHeader<KI>where
KI: Freeze,
impl<KI> RefUnwindSafe for ProtectedHeader<KI>where
KI: RefUnwindSafe,
impl<KI> Send for ProtectedHeader<KI>where
KI: Send,
impl<KI> Sync for ProtectedHeader<KI>where
KI: Sync,
impl<KI> Unpin for ProtectedHeader<KI>where
KI: Unpin,
impl<KI> UnwindSafe for ProtectedHeader<KI>where
KI: UnwindSafe,
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