pub struct Keys { /* private fields */ }Expand description
The keys a verifier has resolved: per host, a key document (with its declarations, since
0.3.7) or the failure resolving it. A host that was never resolved behaves as
E_KEY_UNAVAILABLE (SPEC 11).
Implementations§
Source§impl Keys
impl Keys
Sourcepub fn insert(&mut self, doc: KeyDoc)
pub fn insert(&mut self, doc: KeyDoc)
Adds a checked key document for its host (with no declarations).
Sourcepub fn insert_document(&mut self, doc: KeyDocument)
pub fn insert_document(&mut self, doc: KeyDocument)
Adds a checked key document, with its declarations, for its host (spec-0.4.3).
Sourcepub fn insert_result(&mut self, host: &str, result: Result<KeyDoc>)
pub fn insert_result(&mut self, host: &str, result: Result<KeyDoc>)
Records the outcome of resolving a host: a document, or the error (E_KEY_DOC,
E_KEY_UNAVAILABLE) that resolving it gave.
Sourcepub fn insert_response(&mut self, host: &str, status: u16, body: Option<&[u8]>)
pub fn insert_response(&mut self, host: &str, status: u16, body: Option<&[u8]>)
Records the response to a key document request (see key_document_from_response):
the document’s declarations are kept (Keys::get_document).
Records that a host’s keys could not be retrieved (network, DNS, TLS, timeout).
Sourcepub fn get(&self, host: &str) -> Result<&KeyDoc>
pub fn get(&self, host: &str) -> Result<&KeyDoc>
The key document for host, or why there is none.
Sourcepub fn get_document(&self, host: &str) -> Result<&KeyDocument>
pub fn get_document(&self, host: &str) -> Result<&KeyDocument>
The key document for host with its declarations (spec-0.4.3), or why there is none:
the K of the entitlement check (crate::check_entitlement).