pub struct AcceptContext {
pub expected_api_key: Option<String>,
pub admission: Option<Admission>,
}Expand description
Per-accept context that the lifecycle hands to every spawned connection task.
Today it carries the optional TCP API key (THREAT_MODEL F-8) and
the shared admission gate (queue_full enforcement). New per-
connection policy (rate limits, per-caller quotas) extends this
struct rather than each serve_* signature.
Fields§
§expected_api_key: Option<String>When Some and the connection is TCP, the daemon requires an
auth frame as the first NDJSON line on the wire and constant-
time-compares the key against this value. UDS / pipe ignore
this field — F-7 covers them.
admission: Option<Admission>Shared admission gate. None for tests / dev paths that
don’t care about queue depth — those treat every request
as admitted. Production lifecycle always passes Some.
Trait Implementations§
Source§impl Clone for AcceptContext
impl Clone for AcceptContext
Source§fn clone(&self) -> AcceptContext
fn clone(&self) -> AcceptContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AcceptContext
impl Debug for AcceptContext
Source§impl Default for AcceptContext
impl Default for AcceptContext
Source§fn default() -> AcceptContext
fn default() -> AcceptContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AcceptContext
impl !RefUnwindSafe for AcceptContext
impl Send for AcceptContext
impl Sync for AcceptContext
impl Unpin for AcceptContext
impl UnsafeUnpin for AcceptContext
impl !UnwindSafe for AcceptContext
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