Skip to main content

ResolverLocalServerHandler

Trait ResolverLocalServerHandler 

Source
pub trait ResolverLocalServerHandler<___T: Transport = Channel> {
    // Required methods
    fn resolve(
        &mut self,
        request: Request<Resolve, ___T>,
        responder: Responder<Resolve, ___T>,
    ) -> impl Future<Output = ()>;
    fn resolve_with_context(
        &mut self,
        request: Request<ResolveWithContext, ___T>,
        responder: Responder<ResolveWithContext, ___T>,
    ) -> impl Future<Output = ()>;

    // Provided method
    fn on_unknown_interaction(
        &mut self,
        ordinal: u64,
    ) -> impl Future<Output = ()> { ... }
}
Expand description

A server handler for the Resolver protocol.

See Resolver for more details.

Required Methods§

Source

fn resolve( &mut self, request: Request<Resolve, ___T>, responder: Responder<Resolve, ___T>, ) -> impl Future<Output = ()>

Resolves a component with the given absolute URL.

component_url is the unescaped URL of the component to resolve.

If successful, returns information about the component that was resolved.

On failure, returns a ResolverError error.

Source

fn resolve_with_context( &mut self, request: Request<ResolveWithContext, ___T>, responder: Responder<ResolveWithContext, ___T>, ) -> impl Future<Output = ()>

Resolves a component with the absolute or relative URL. If relative, the component will be resolved relative to the supplied context.

component_url is the unescaped URL of the component to resolve, the format of which can be either:

  • a fully-qualified absolute component URL; or
  • a subpackaged-component reference, prefixed by a URI relative path to its containing subpackage (for example, child_package#meta/some_component.cm)

context is the resolution_context of a previously-resolved Component, providing the context for resoving a relative URL.

Provided Methods§

Source

fn on_unknown_interaction(&mut self, ordinal: u64) -> impl Future<Output = ()>

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<___H, ___T> ResolverLocalServerHandler<___T> for Local<___H>
where ___H: ResolverServerHandler<___T>, ___T: Transport,

Source§

async fn resolve( &mut self, request: Request<Resolve, ___T>, responder: Responder<Resolve, ___T>, )

Source§

async fn resolve_with_context( &mut self, request: Request<ResolveWithContext, ___T>, responder: Responder<ResolveWithContext, ___T>, )

Source§

async fn on_unknown_interaction(&mut self, ordinal: u64)

Implementors§