MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / to_result

Method to_result

atomic-identity/src/signing.rs:402–412  ·  view source on GitHub ↗

Convert to a Result.

(&self)

Source from the content-addressed store, hash-verified

400
401 /// Convert to a Result.
402 pub fn to_result(&self) -> Result<(), IdentityError> {
403 match self {
404 VerificationResult::Valid { .. } => Ok(()),
405 VerificationResult::Invalid { reason } => {
406 Err(IdentityError::VerificationFailed(reason.clone()))
407 }
408 VerificationResult::NotSigned => {
409 Err(IdentityError::VerificationFailed("Not signed".to_string()))
410 }
411 }
412 }
413}
414
415impl fmt::Display for VerificationResult {

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected