pub struct VerifierKey {
pub key_id: String,
pub public_key: [u8; 32],
pub not_before_ms: Option<i64>,
pub not_after_ms: Option<i64>,
}Expand description
One key of a §7.2 key list.
Fields§
§key_id: StringThe key id ([A-Za-z0-9._-], 1-64 bytes).
public_key: [u8; 32]The Ed25519 public key.
not_before_ms: Option<i64>The key is not valid for requests created before this epoch millisecond, if set.
not_after_ms: Option<i64>The key is not valid for requests created after this epoch millisecond, if set.
Implementations§
Source§impl VerifierKey
impl VerifierKey
Sourcepub fn new(key_id: impl Into<String>, public_key: [u8; 32]) -> VerifierKey
pub fn new(key_id: impl Into<String>, public_key: [u8; 32]) -> VerifierKey
A key with no validity bounds.
Sourcepub fn parse_list(json: &str) -> Result<Vec<VerifierKey>, KeyListError>
pub fn parse_list(json: &str) -> Result<Vec<VerifierKey>, KeyListError>
The keys of a §7.2 key-list JSON document.
§Errors
KeyListError for anything the format refuses: another version or
alg, a public key that is not 64 lowercase hex digits, a bound that
is not a decimal int64 string, a key id outside the §7.1 grammar, or
a repeated key id.
Trait Implementations§
Source§impl Clone for VerifierKey
impl Clone for VerifierKey
Source§fn clone(&self) -> VerifierKey
fn clone(&self) -> VerifierKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VerifierKey
impl Debug for VerifierKey
impl Eq for VerifierKey
Source§impl PartialEq for VerifierKey
impl PartialEq for VerifierKey
impl StructuralPartialEq for VerifierKey
Auto Trait Implementations§
impl Freeze for VerifierKey
impl RefUnwindSafe for VerifierKey
impl Send for VerifierKey
impl Sync for VerifierKey
impl Unpin for VerifierKey
impl UnsafeUnpin for VerifierKey
impl UnwindSafe for VerifierKey
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