ring_native_ossl/
error.rs1#[derive(Debug, Clone, Copy, PartialEq, Eq)]
10pub struct Unspecified;
11
12impl std::fmt::Display for Unspecified {
13 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14 f.write_str("Unspecified")
15 }
16}
17
18impl std::error::Error for Unspecified {}
19
20#[derive(Debug)]
22pub struct KeyRejected(&'static str);
23
24impl KeyRejected {
25 pub(crate) fn new(reason: &'static str) -> Self {
26 Self(reason)
27 }
28
29 #[must_use]
30 pub fn description_when_internal(&self) -> &'static str {
31 self.0
32 }
33}
34
35impl std::fmt::Display for KeyRejected {
36 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
37 write!(f, "KeyRejected: {}", self.0)
38 }
39}
40
41impl std::error::Error for KeyRejected {}