pub struct AppState {
pub config: McpConfig,
pub auth_policy: AuthPolicy,
pub response_pages: ResponsePageStore,
/* private fields */
}Expand description
Shared transport state injected into every request handler.
Fields§
§config: McpConfig§auth_policy: AuthPolicy§response_pages: ResponsePageStoreImplementations§
Source§impl AppState
impl AppState
pub fn new( config: McpConfig, auth_policy: AuthPolicy, runtime: Arc<SomaRuntime>, response_pages: ResponsePageStore, ) -> Self
pub fn runtime(&self) -> &SomaRuntime
pub fn application(&self) -> &SomaApplication
pub fn application_handle(&self) -> Arc<SomaApplication> ⓘ
pub fn resolve_protected_route( &self, host: &str, path: &str, ) -> Option<ProtectedMcpRouteConfig>
pub fn resolve_protected_route_metadata( &self, host: &str, path: &str, ) -> Option<ProtectedMcpRouteConfig>
pub fn protected_route_list(&self) -> Vec<ProtectedMcpRouteConfig>
pub fn upstream_config(&self, name: &str) -> Option<UpstreamConfig>
pub async fn upstream_oauth_access_token( &self, upstream: &UpstreamConfig, subject: &str, ) -> Result<Option<String>, GatewayManagerError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl !UnwindSafe for AppState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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