pub enum ResolverRequest {
Resolve {
component_url: String,
responder: ResolverResolveResponder,
},
ResolveWithContext {
component_url: String,
context: Context,
responder: ResolverResolveWithContextResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: ResolverControlHandle,
method_type: MethodType,
},
}
Expand description
An interface for resolving a URL to a component.
This interface is implemented by components that provide support for loading components with a particular URL scheme. For example, the Fuchsia package component resolver exposes a service with this interface to resolve component URLs using the “fuchsia-pkg://” scheme.
To use a resolver to resolve URLs within your realm, register it in your realm’s manifest.
Note: The component manager is the only intended direct client of this interface.
Variants§
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.
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.
#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ResolverControlHandle
method_type: MethodType
Implementations§
Source§impl ResolverRequest
impl ResolverRequest
pub fn into_resolve(self) -> Option<(String, ResolverResolveResponder)>
pub fn into_resolve_with_context( self, ) -> Option<(String, Context, ResolverResolveWithContextResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ResolverRequest
impl !RefUnwindSafe for ResolverRequest
impl Send for ResolverRequest
impl Sync for ResolverRequest
impl Unpin for ResolverRequest
impl !UnwindSafe for ResolverRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T
to [Self
]