pub struct HttpEndpointMeta { /* private fields */ }Expand description
Discovery metadata for a self-mounting HTTP endpoint owned by another
surface (a GraphQL schema, an MCP streamable-HTTP service). The closure
nests one opaque sub-endpoint at its own path; path and label exist
only so the transport can list the mount in its boot-time route log.
Implementations§
Source§impl HttpEndpointMeta
impl HttpEndpointMeta
Sourcepub fn new<F>(
path: impl Into<Cow<'static, str>>,
label: impl Into<Cow<'static, str>>,
mount: F,
) -> Self
pub fn new<F>( path: impl Into<Cow<'static, str>>, label: impl Into<Cow<'static, str>>, mount: F, ) -> Self
path and label accept either a &'static str or an owned String
— so a module configured via for_root can nest at a runtime path.
Defaults to EdgePosture::Guarded; call Self::exempt for a
surface that authenticates in-band or is intentionally public.
Sourcepub fn exempt(self) -> Self
pub fn exempt(self) -> Self
Mark this self-mount EdgePosture::Exempt — the transport skips the
global edge guard (the surface gates in-band, or is public).
pub fn path(&self) -> &str
pub fn label(&self) -> &str
pub fn posture(&self) -> EdgePosture
pub fn mount(&self, container: &Container, route: Route) -> Route
Auto Trait Implementations§
impl !RefUnwindSafe for HttpEndpointMeta
impl !UnwindSafe for HttpEndpointMeta
impl Freeze for HttpEndpointMeta
impl Send for HttpEndpointMeta
impl Sync for HttpEndpointMeta
impl Unpin for HttpEndpointMeta
impl UnsafeUnpin for HttpEndpointMeta
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> 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> TowerCompatExt for T
impl<T> TowerCompatExt for T
Source§fn compat<ResBody, Err, Fut>(self) -> TowerCompatEndpoint<Self>where
ResBody: Body + Send + Sync + 'static,
<ResBody as Body>::Data: Into<Bytes> + Send + 'static,
<ResBody as Body>::Error: Error + Send + Sync + 'static,
Err: Into<Error>,
Self: Sized + Service<Request<BoxBody<Bytes, Error>>, Response = Response<ResBody>, Error = Err, Future = Fut> + Clone + Send + Sync + 'static,
Fut: Future<Output = Result<Response<ResBody>, Err>> + Send + 'static,
fn compat<ResBody, Err, Fut>(self) -> TowerCompatEndpoint<Self>where
ResBody: Body + Send + Sync + 'static,
<ResBody as Body>::Data: Into<Bytes> + Send + 'static,
<ResBody as Body>::Error: Error + Send + Sync + 'static,
Err: Into<Error>,
Self: Sized + Service<Request<BoxBody<Bytes, Error>>, Response = Response<ResBody>, Error = Err, Future = Fut> + Clone + Send + Sync + 'static,
Fut: Future<Output = Result<Response<ResBody>, Err>> + Send + 'static,
Converts a tower service to a poem endpoint.