ResolverServerHandler

Trait ResolverServerHandler 

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

    // Provided method
    fn on_unknown_interaction(
        &mut self,
        ordinal: u64,
    ) -> impl Future<Output = Result<(), ProtocolError<<___T as Transport>::Error>>> + Send { ... }
}
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 = ()> + Send

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 = ()> + Send

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 = Result<(), ProtocolError<<___T as Transport>::Error>>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§