pub struct AuthGate(/* private fields */);Expand description
Whether a connection has got past the door, shared by everything that asks.
One flag with three readers in three modules — the accept loop’s eviction candidacy (D80), the bound on how long a connection may say nothing (D76), and the stream allowance above (D98) — and one of those is not a read at all but a transition: the raise happens on the false-to-true edge and must happen exactly once, however many requests authenticate at the same moment.
A newtype rather than the Arc<AtomicBool> it wraps, because that invariant
cannot survive as a convention across three modules: a plain store(true)
written anywhere in them compiles and silently skips the raise. There is no
way to open this gate without being told whether you were the one who opened
it.