Skip to main content

HttpEndpointMeta

Struct HttpEndpointMeta 

Source
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

Source

pub fn new<F>( path: impl Into<Cow<'static, str>>, label: impl Into<Cow<'static, str>>, mount: F, ) -> Self
where F: Fn(&Container, Route) -> Route + Send + Sync + 'static,

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.

Source

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).

Source

pub fn path(&self) -> &str

Source

pub fn label(&self) -> &str

Source

pub fn posture(&self) -> EdgePosture

Source

pub fn mount(&self, container: &Container, route: Route) -> Route

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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,

Converts a tower service to a poem endpoint.
Source§

impl<L> TowerLayerCompatExt for L

Source§

fn compat(self) -> TowerCompatMiddleware<Self>
where Self: Sized,

Converts a tower layer to a poem middleware.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more