pub struct SessionConfig {
pub route: String,
pub component: String,
pub imports: Vec<String>,
pub limits: Option<HandlerLimits>,
pub env: BTreeMap<String, String>,
pub invoke_targets: Vec<String>,
pub tenancy: Option<Tenancy>,
pub token_claims: Option<HandlerGraphqlTokenClaims>,
}Expand description
A duplex, resumable session route (PLAN-session-primitive): a long-lived,
client-addressable, bidirectional channel served by a guest component’s session-handler
export, which the host re-enters per inbound frame (mechanism B). The host opens the session on
route (SSE-out + POST-in), binds the verified principal, buffers/orders outbound frames with
resume-from-cursor, and persists a resumable checkpoint. Frames are opaque bytes. Unlike a
StreamConfig (host-only pub/sub fan-out), a session runs guest code and carries a backchannel.
Fields§
§route: StringRoute the session is opened at (the client GETs it for the SSE stream and POSTs inbound
frames to it). Matcher syntax, like a handler route.
component: StringPath to the session component .wasm within the deployment (exports session-handler).
imports: Vec<String>Requested capabilities (interface names; see KNOWN_IMPORTS). A session handler declares
session plus whatever sql/orm/invoke/… it uses per frame.
limits: Option<HandlerLimits>Optional resource limits (capped by site config at activation).
env: BTreeMap<String, String>Static environment variables (never secrets).
invoke_targets: Vec<String>Function-to-function invoke allowlist (same contract as a handler’s invoke_targets).
tenancy: Option<Tenancy>In-site tenancy decision for this session’s sql/orm (Dimension 0). Resolved once at
open from the verified source and carried across every re-entry, so a frame-triggered
query is host-scoped identically to a normal handler. Absent ⇒ plain (project = database).
token_claims: Option<HandlerGraphqlTokenClaims>JWKS/issuer verifying the app bearer for a token-sourced tenant (same as a function’s).
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
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 SessionConfig
impl Debug for SessionConfig
Source§impl Default for SessionConfig
impl Default for SessionConfig
Source§fn default() -> SessionConfig
fn default() -> SessionConfig
Source§impl<'de> Deserialize<'de> for SessionConfigwhere
SessionConfig: Default,
impl<'de> Deserialize<'de> for SessionConfigwhere
SessionConfig: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SessionConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for SessionConfig
Source§impl PartialEq for SessionConfig
impl PartialEq for SessionConfig
Source§impl Serialize for SessionConfig
impl Serialize for SessionConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for SessionConfig
Auto Trait Implementations§
impl Freeze for SessionConfig
impl RefUnwindSafe for SessionConfig
impl Send for SessionConfig
impl Sync for SessionConfig
impl Unpin for SessionConfig
impl UnsafeUnpin for SessionConfig
impl UnwindSafe for SessionConfig
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.