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