#[non_exhaustive]pub struct Badge {
pub status: BadgeStatus,
pub payload: BadgePayload,
pub schema_version: String,
pub signature: Option<String>,
pub merkle_proof: Option<MerkleProof>,
}Expand description
Full badge response from the Transparency Log API.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.status: BadgeStatusCurrent status of the badge.
payload: BadgePayloadBadge payload containing the signed event.
schema_version: StringSchema version (e.g., “V1”).
signature: Option<String>Signature over the badge.
merkle_proof: Option<MerkleProof>Merkle proof for transparency log inclusion.
Implementations§
Source§impl Badge
impl Badge
Sourcepub fn agent_name(&self) -> &str
pub fn agent_name(&self) -> &str
Get the agent’s ANS name.
Sourcepub fn agent_host(&self) -> &str
pub fn agent_host(&self) -> &str
Get the agent’s host FQDN.
Sourcepub fn agent_version(&self) -> &str
pub fn agent_version(&self) -> &str
Get the agent’s version string.
Sourcepub fn server_cert_fingerprint(&self) -> &str
pub fn server_cert_fingerprint(&self) -> &str
Get the server certificate fingerprint.
Sourcepub fn identity_cert_fingerprint(&self) -> &str
pub fn identity_cert_fingerprint(&self) -> &str
Get the identity certificate fingerprint.
Sourcepub fn event_type(&self) -> EventType
pub fn event_type(&self) -> EventType
Get the event type.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Badge
impl<'de> Deserialize<'de> for Badge
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
Auto Trait Implementations§
impl Freeze for Badge
impl RefUnwindSafe for Badge
impl Send for Badge
impl Sync for Badge
impl Unpin for Badge
impl UnsafeUnpin for Badge
impl UnwindSafe for Badge
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