pub struct InsecureBindError {
pub host: String,
pub gate: Option<String>,
}Expand description
A server was asked to serve a reachable interface with no key.
require_auth fails open when its key is unset — deliberately, so a
developer can run without ceremony, and unchanged here because it is a
documented contract with reverse dependencies this workspace cannot
enumerate. That default is survivable on loopback and not on an interface
something else can reach.
This is the other half: a startup check the binary opts into, because
deciding to terminate a process belongs to main, not to a library. The
middleware cannot make this call itself — it sees a request, never the bind
address.
Fields§
§host: StringThe non-loopback host the server was asked to bind.
gate: Option<String>The environment variable that arms the gate, when the gate is a shared
key, so the refusal can say what to set. None when the gate is
something else (an AuthHook, Google ID
tokens) and there is no single variable to name.
Implementations§
Source§impl InsecureBindError
impl InsecureBindError
Sourcepub fn new(host: impl Into<String>) -> InsecureBindError
pub fn new(host: impl Into<String>) -> InsecureBindError
A refusal of host for a service whose gate is not a single variable.
Trait Implementations§
Source§impl Clone for InsecureBindError
impl Clone for InsecureBindError
Source§fn clone(&self) -> InsecureBindError
fn clone(&self) -> InsecureBindError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InsecureBindError
impl Debug for InsecureBindError
Source§impl Display for InsecureBindError
impl Display for InsecureBindError
impl Eq for InsecureBindError
Source§impl Error for InsecureBindError
impl Error for InsecureBindError
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 PartialEq for InsecureBindError
impl PartialEq for InsecureBindError
impl StructuralPartialEq for InsecureBindError
Auto Trait Implementations§
impl Forget for InsecureBindError
impl Freeze for InsecureBindError
impl Move for InsecureBindError
impl RefUnwindSafe for InsecureBindError
impl Send for InsecureBindError
impl Sync for InsecureBindError
impl Unpin for InsecureBindError
impl UnsafeUnpin for InsecureBindError
impl UnwindSafe for InsecureBindError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.