#[non_exhaustive]pub enum PeerError {
}Expand description
Sanitized failures while loading, storing or using a peer identity. No message holds key
material; only CaFile names a path, the file it could not use.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidId
A peer id is malformed.
Certificate
A certificate or its private key is missing or invalid.
Tls
A TLS configuration or handshake was refused.
WeakDigest
A fingerprint is an MD5 digest, which no policy allows.
Policy(String)
A policy setting is invalid or unsupported; the message names it and lists what is supported. It never holds key material.
TrustPattern
A trust glob is malformed.
NotWaiting
The peer is not waiting for acceptance.
AlreadyAccepted
The peer was already accepted.
Path
The path does not name a file inside a directory.
Unsupported
The trust policy cannot be used in this role.
Pairing(PairingError)
A pairing exchange, or a key rotation, failed: refused by either side, a malformed
message, an unverified responder, or the store (a rotation announced by a peer that is
not accepted is PairingError::Local with coqui_peer::Error::NotAccepted).
Io(Error)
A filesystem or stream operation failed.
CaFile
A file of certificate authorities (CaPolicy::ca_file,
Roots::bundle_file) or a bundle given as text cannot be
used: unreadable, holding no certificate, or holding one that is malformed or cannot be
a trust anchor.
Implementations§
Source§impl PeerError
impl PeerError
Sourcepub fn pair_refusal(&self) -> Option<PairRefusal>
pub fn pair_refusal(&self) -> Option<PairRefusal>
Why a pairing was refused, by this side or the other, when that is the failure.
Trait Implementations§
Source§impl Error for PeerError
impl Error for PeerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()