pub struct TrustKeyMetadataV1 {
pub key_id: String,
pub public_key_hex: String,
pub role: TrustKeyRole,
pub not_before_unix_ms: u64,
pub not_after_unix_ms: Option<u64>,
pub revoked_at_unix_ms: Option<u64>,
pub emergency_revoked: bool,
}Expand description
A trusted publisher key and its lifecycle state.
Fields§
§key_id: String§public_key_hex: String§role: TrustKeyRole§not_before_unix_ms: u64§not_after_unix_ms: Option<u64>§revoked_at_unix_ms: Option<u64>§emergency_revoked: boolImplementations§
Source§impl TrustKeyMetadataV1
impl TrustKeyMetadataV1
pub fn validate_shape(&self) -> Result<(), &'static str>
Sourcepub fn is_active_at(&self, now_unix_ms: u64) -> bool
pub fn is_active_at(&self, now_unix_ms: u64) -> bool
Whether this key may authenticate an artifact at now_unix_ms.
Trait Implementations§
Source§impl Clone for TrustKeyMetadataV1
impl Clone for TrustKeyMetadataV1
Source§fn clone(&self) -> TrustKeyMetadataV1
fn clone(&self) -> TrustKeyMetadataV1
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 TrustKeyMetadataV1
impl Debug for TrustKeyMetadataV1
Source§impl<'de> Deserialize<'de> for TrustKeyMetadataV1
impl<'de> Deserialize<'de> for TrustKeyMetadataV1
Source§fn 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 Eq for TrustKeyMetadataV1
Source§impl PartialEq for TrustKeyMetadataV1
impl PartialEq for TrustKeyMetadataV1
Source§impl Serialize for TrustKeyMetadataV1
impl Serialize for TrustKeyMetadataV1
impl StructuralPartialEq for TrustKeyMetadataV1
Auto Trait Implementations§
impl Freeze for TrustKeyMetadataV1
impl RefUnwindSafe for TrustKeyMetadataV1
impl Send for TrustKeyMetadataV1
impl Sync for TrustKeyMetadataV1
impl Unpin for TrustKeyMetadataV1
impl UnsafeUnpin for TrustKeyMetadataV1
impl UnwindSafe for TrustKeyMetadataV1
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