pub enum TrustError {
Unreadable {
path: String,
source: Error,
},
Empty {
path: String,
},
NoneUsable {
path: String,
count: usize,
},
}Expand description
Why the trust roots could not be assembled.
Each variant names the file. A deployment failing with “invalid certificate” and no path is a deployment somebody has to guess about.
Variants§
Unreadable
The file could not be opened, read, or parsed as PEM.
Empty
The file was read but held no certificate.
A PEM file of only a private key lands here, as does an empty file and a file of PEM-looking text that parsed to nothing. All three mean the same thing to a caller: the bundle contributed no roots, so continuing would silently use the defaults.
NoneUsable
Certificates parsed, but rustls rejected every one of them.
Trait Implementations§
Source§impl Debug for TrustError
impl Debug for TrustError
Source§impl Display for TrustError
impl Display for TrustError
Source§impl Error for TrustError
impl Error for TrustError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<TrustError> for ConfigError
impl From<TrustError> for ConfigError
Source§fn from(source: TrustError) -> Self
fn from(source: TrustError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for TrustError
impl !UnwindSafe for TrustError
impl Freeze for TrustError
impl Send for TrustError
impl Sync for TrustError
impl Unpin for TrustError
impl UnsafeUnpin for TrustError
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