pub enum ListenerMode {
Connection,
Session,
}Expand description
How a [serve.listeners.<name>] drives each accepted connection (cap-req 08). See
ListenerConfig::mode.
Variants§
Connection
Long-lived tcp-connection-handler — one wasm instance pinned per connection for its whole life
(the original inbound-TCP model). The default.
Session
Re-entrant session-handler — the host owns the socket and drives it through the session model,
holding NO instance between inbound batches (idle ⇒ socket + checkpoint only). A quiet, PARKED
connection (blocked on the socket read between batches) is NOT evicted for inactivity — only the
absolute max_conn_duration_ms cap and dead-peer detection (EOF) end it, so a protocol-idle but
alive peer (IMAP IDLE) survives. In this mode idle_timeout_ms is reinterpreted as the
per-re-entry processing deadline — the max wall-clock ONE re-entry may spend (instantiate +
handle + write its response) — bounding a guest stalled on a slow/zero-window peer so it cannot
pin a session-pool slot + instance; a re-entry that exceeds it is cancelled and the connection
closed. Re-entries run on a DEDICATED concurrency pool, never the shared async lane.
Trait Implementations§
Source§impl Clone for ListenerMode
impl Clone for ListenerMode
impl Copy for ListenerMode
Source§impl Debug for ListenerMode
impl Debug for ListenerMode
Source§impl Default for ListenerMode
impl Default for ListenerMode
Source§impl<'de> Deserialize<'de> for ListenerMode
impl<'de> Deserialize<'de> for ListenerMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for ListenerMode
Source§impl PartialEq for ListenerMode
impl PartialEq for ListenerMode
Source§impl Serialize for ListenerMode
impl Serialize for ListenerMode
impl StructuralPartialEq for ListenerMode
Auto Trait Implementations§
impl Freeze for ListenerMode
impl RefUnwindSafe for ListenerMode
impl Send for ListenerMode
impl Sync for ListenerMode
impl Unpin for ListenerMode
impl UnsafeUnpin for ListenerMode
impl UnwindSafe for ListenerMode
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more