#[non_exhaustive]pub enum Refusal {
Show 17 variants
NoSections,
NoClients,
DuplicateSection {
application: String,
profile: String,
},
UnroutableSection {
application: String,
profile: String,
part: &'static str,
},
DuplicateClient {
name: String,
},
DuplicateToken,
WeakToken {
client: String,
},
AnonymousNotAllowed {
client: String,
},
SeveralAnonymousClients,
UnservedGrant {
client: String,
application: String,
},
ExposedBind {
bind: String,
},
KubernetesAuth {
reason: String,
},
UnparsableBind {
bind: String,
},
TlsUnsupported,
InsecureWithTls,
TlsPathMissing {
key: &'static str,
},
RevocationUnsupported,
}Expand description
Why a configuration will not start a server.
Every variant’s Display names the key that fixes it, and none of them
carries a token: a refusal is printed to a terminal and scraped into a
log, which is the last place a credential should turn up.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NoSections
No sections — the server would serve nothing.
NoClients
No clients — nobody could ever read anything.
DuplicateSection
Two sections claim the same application and profile.
UnroutableSection
A section names an application or profile no route can carry, so nothing could ever reach it.
Fields
DuplicateClient
Two clients share a name.
DuplicateToken
Two clients share a token.
WeakToken
A configured token is shorter than MIN_TOKEN_LEN.
AnonymousNotAllowed
A client has no token and allow_anonymous is not set.
SeveralAnonymousClients
More than one client has no token, so “the anonymous caller” names two different grants.
UnservedGrant
A client is granted an application no section serves.
ExposedBind
A non-loopback bind with neither tls nor insecure.
KubernetesAuth
[kubernetes] was present but unusable — an empty grant list, a
malformed service_account, or an environment that is not a
cluster. The reason names the fix; it never carries a token.
UnparsableBind
bind is not a literal address:port.
TlsUnsupported
[server.tls] in a build compiled without the tls feature.
InsecureWithTls
insecure is set and [server.tls] is configured: an
acknowledgement of something that is not true.
TlsPathMissing
A [server.tls] key that must name a file names an empty string.
RevocationUnsupported
tls.crl is configured. This server checks no revocation and says so
rather than accepting a key it would ignore.
Trait Implementations§
impl Eq for Refusal
Source§impl Error for Refusal
impl Error for Refusal
1.30.0 · 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()
Source§impl From<Refusal> for StartupError
impl From<Refusal> for StartupError
impl StructuralPartialEq for Refusal
Auto Trait Implementations§
impl Freeze for Refusal
impl RefUnwindSafe for Refusal
impl Send for Refusal
impl Sync for Refusal
impl Unpin for Refusal
impl UnsafeUnpin for Refusal
impl UnwindSafe for Refusal
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.