pub trait ResolverServerHandler<___T: Transport> {
// Required methods
fn resolve(
&mut self,
sender: &ServerSender<Resolver, ___T>,
request: Request<Resolve, ___T>,
responder: Responder<Resolve>,
) -> impl Future<Output = ()> + Send;
fn resolve_with_context(
&mut self,
sender: &ServerSender<Resolver, ___T>,
request: Request<ResolveWithContext, ___T>,
responder: Responder<ResolveWithContext>,
) -> impl Future<Output = ()> + Send;
// Provided method
fn on_unknown_interaction(
&mut self,
sender: &ServerSender<Resolver, ___T>,
ordinal: u64,
) -> impl Future<Output = ()> + Send { ... }
}
Expand description
A server handler for the Resolver protocol.
See Resolver
for more details.
Required Methods§
Sourcefn resolve(
&mut self,
sender: &ServerSender<Resolver, ___T>,
request: Request<Resolve, ___T>,
responder: Responder<Resolve>,
) -> impl Future<Output = ()> + Send
fn resolve( &mut self, sender: &ServerSender<Resolver, ___T>, request: Request<Resolve, ___T>, responder: Responder<Resolve>, ) -> 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.
Sourcefn resolve_with_context(
&mut self,
sender: &ServerSender<Resolver, ___T>,
request: Request<ResolveWithContext, ___T>,
responder: Responder<ResolveWithContext>,
) -> impl Future<Output = ()> + Send
fn resolve_with_context( &mut self, sender: &ServerSender<Resolver, ___T>, request: Request<ResolveWithContext, ___T>, responder: Responder<ResolveWithContext>, ) -> 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§
fn on_unknown_interaction( &mut self, sender: &ServerSender<Resolver, ___T>, ordinal: u64, ) -> impl Future<Output = ()> + 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.