#[non_exhaustive]pub enum GhostkeyResponse {
Show 22 variants
ImportResult {
fingerprint: String,
notary_info: String,
},
GhostKeyList {
keys: Vec<GhostKeyInfo>,
},
GhostKeyDetail {
fingerprint: String,
certificate_pem: String,
label: Option<String>,
notary_info: String,
},
Certificate {
fingerprint: String,
certificate_pem: String,
},
SignResult {
scoped_payload: Vec<u8>,
signature: Vec<u8>,
certificate_pem: String,
},
DefaultKeyResult {
fingerprint: Option<String>,
},
DefaultKeySet {
fingerprint: String,
},
VerifyResult {
valid: bool,
signer_fingerprint: Option<String>,
notary_info: Option<String>,
requestor: Option<SignatureRequestor>,
message: Option<Vec<u8>>,
},
Deleted {
fingerprint: String,
},
LabelSet {
fingerprint: String,
label: String,
},
PermissionGranted {
fingerprint: String,
requestor: SignatureRequestor,
},
PermissionRevoked {
fingerprint: String,
requestor: SignatureRequestor,
},
PermissionList {
fingerprint: String,
requestors: Vec<SignatureRequestor>,
},
ExportResult {
fingerprint: String,
certificate_pem: String,
signing_key_pem: String,
label: Option<String>,
},
ExportAllResult {
keys: Vec<ExportedGhostKey>,
},
PermissionDenied {
fingerprint: String,
requestor: SignatureRequestor,
},
AccessDenied {
requestor: SignatureRequestor,
},
NoIdentityAvailable,
IdentityPresence {
usable: usize,
unusable: usize,
},
BackedUpMarked {
fingerprint: String,
},
KeyNotFound {
fingerprint: String,
},
Error {
message: String,
},
}Expand description
Responses from the ghostkey delegate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ImportResult
GhostKeyList
Fields
keys: Vec<GhostKeyInfo>GhostKeyDetail
Certificate
SignResult
Fields
DefaultKeyResult
DefaultKeySet
VerifyResult
Fields
requestor: Option<SignatureRequestor>Deleted
LabelSet
PermissionGranted
PermissionRevoked
PermissionList
ExportResult
ExportAllResult
Fields
keys: Vec<ExportedGhostKey>PermissionDenied
AccessDenied
Permission denied for a request that didn’t name a specific
fingerprint – today this means the user denied a
RequestAnyAccess prompt. Distinct from PermissionDenied so
callers don’t have to invent a placeholder fingerprint to
pattern-match.
Fields
requestor: SignatureRequestorNoIdentityAvailable
The user has no ghostkeys. Apps should direct the user to freenet.org/ghostkey to purchase one.
It is NOT returned merely because the caller lacks permission —
SignWithDefault prompts the user instead when the vault holds keys
the caller has no grant on. So an app can treat this as “offer to buy
one” without first checking whether it was really a permissions
problem.
Precisely, it means no identity is available to sign with: either the
vault is empty, or every identity in it has lost its signing key. Use
HasIdentity to tell those apart — its unusable count is non-zero in
the second case, which is worth a different message, since buying
another key is not what that user needs.
IdentityPresence
Reply to HasIdentity. Counts only — no fingerprints, labels or tiers.
Fields
BackedUpMarked
Confirms MarkBackedUp.
KeyNotFound
The requested ghostkey fingerprint was not found.
Error
Generic error for unexpected failures.
Trait Implementations§
Source§impl Clone for GhostkeyResponse
impl Clone for GhostkeyResponse
Source§fn clone(&self) -> GhostkeyResponse
fn clone(&self) -> GhostkeyResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more