pub trait ProtocolHandler: Send + Sync {
// Required methods
fn scheme(&self) -> &str;
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
url: &'life1 str,
selector: Option<&'life2 str>,
ctx: &'life3 ResolveContext,
) -> Pin<Box<dyn Future<Output = Result<ResolvedUrl, SdkError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
// Provided method
fn immutable(&self) -> bool { ... }
}Expand description
Single-scheme handler contract. Products implement one per scheme (issue://, pr://, agent://, etc.) and register them with the router.
Required Methods§
Sourcefn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
url: &'life1 str,
selector: Option<&'life2 str>,
ctx: &'life3 ResolveContext,
) -> Pin<Box<dyn Future<Output = Result<ResolvedUrl, SdkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn resolve<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
url: &'life1 str,
selector: Option<&'life2 str>,
ctx: &'life3 ResolveContext,
) -> Pin<Box<dyn Future<Output = Result<ResolvedUrl, SdkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Resolve a URL path (scheme already stripped) to text content.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".