pub struct HttpSessionConfig {
pub idle_timeout: Duration,
pub max_sessions: usize,
}Expand description
Session lifetime policy for the Streamable HTTP transport.
A session holds memory for as long as it exists — replay history, log level, pending server requests — and a client that initializes and walks away never says so. §Session Management lets the server end a session at any time; requests naming it then get 404 and a conforming client starts a new one.
Fields§
§idle_timeout: DurationHow long a session may sit idle before it is reaped.
A session is idle while it has no request in flight and no attached stream, so a client holding a GET stream open is never reaped however quiet it is.
max_sessions: usizeMaximum concurrent sessions. An initialize beyond this is refused
with 503 Service Unavailable, after idle sessions have been reaped.
Trait Implementations§
Source§impl Clone for HttpSessionConfig
impl Clone for HttpSessionConfig
impl Copy for HttpSessionConfig
Source§impl Debug for HttpSessionConfig
impl Debug for HttpSessionConfig
Auto Trait Implementations§
impl Freeze for HttpSessionConfig
impl RefUnwindSafe for HttpSessionConfig
impl Send for HttpSessionConfig
impl Sync for HttpSessionConfig
impl Unpin for HttpSessionConfig
impl UnsafeUnpin for HttpSessionConfig
impl UnwindSafe for HttpSessionConfig
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