Skip to main content

InternalUrlRouter

Trait InternalUrlRouter 

Source
pub trait InternalUrlRouter:
    Send
    + Sync
    + 'static {
    // Required method
    fn resolve<'a>(
        &'a self,
        uri: &'a str,
        ctx: &'a ResolveContext,
    ) -> Pin<Box<dyn Future<Output = Result<ResolvedUrl, SdkError>> + Send + 'a>>;

    // Provided methods
    fn schemes(&self) -> &[&str] { ... }
    fn registered_schemes(&self) -> Vec<String> { ... }
}
Expand description

Resolves scheme://path URIs (issue://, pr://, agent://, etc.) into text.

Required Methods§

Source

fn resolve<'a>( &'a self, uri: &'a str, ctx: &'a ResolveContext, ) -> Pin<Box<dyn Future<Output = Result<ResolvedUrl, SdkError>> + Send + 'a>>

Resolve a scheme://path URI to text content.

Provided Methods§

Source

fn schemes(&self) -> &[&str]

Schemes this router handles. Empty = handles none.

Source

fn registered_schemes(&self) -> Vec<String>

Currently registered schemes (for diagnostics). Default: empty.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§