pub struct Verification {
pub verified: bool,
pub reason: String,
pub signature: Option<String>,
pub payload: Option<String>,
}Expand description
GPG or SSH signature verification status for a commit.
GitHub verifies signatures against known public keys associated with GitHub
accounts. The reason field explains the outcome of that verification.
§Examples
let commit = client.get_commit("owner", "repo", "abc123").await?;
if let Some(v) = &commit.commit.verification {
if v.verified {
println!("Commit is signed and verified");
} else {
println!("Signature issue: {}", v.reason);
}
}Fields§
§verified: boolWhether the signature is cryptographically valid and the key is trusted.
reason: StringHuman-readable reason for the verification status.
Common values: "valid", "invalid", "expired_key", "unknown_key",
"unsigned", "no_user".
signature: Option<String>Raw GPG signature payload, if present.
payload: Option<String>Signed content (the data that was signed), if present.
Trait Implementations§
Source§impl Clone for Verification
impl Clone for Verification
Source§fn clone(&self) -> Verification
fn clone(&self) -> Verification
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 Debug for Verification
impl Debug for Verification
Source§impl<'de> Deserialize<'de> for Verification
impl<'de> Deserialize<'de> for Verification
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 Verification
impl RefUnwindSafe for Verification
impl Send for Verification
impl Sync for Verification
impl Unpin for Verification
impl UnsafeUnpin for Verification
impl UnwindSafe for Verification
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