Trait ResolveOriginExt

Source
pub trait ResolveOriginExt: Send {
    // Required methods
    fn resolve_asset(
        self: Vc<Self>,
        request: Vc<Request>,
        options: Vc<ResolveOptions>,
        reference_type: Value<ReferenceType>,
    ) -> impl Future<Output = Result<Vc<ModuleResolveResult>>> + Send;
    fn resolve_options(
        self: Vc<Self>,
        reference_type: Value<ReferenceType>,
    ) -> Vc<ResolveOptions>;
    fn with_transition(
        self: ResolvedVc<Self>,
        transition: RcStr,
    ) -> Vc<Box<dyn ResolveOrigin>>;
}

Required Methods§

Source

fn resolve_asset( self: Vc<Self>, request: Vc<Request>, options: Vc<ResolveOptions>, reference_type: Value<ReferenceType>, ) -> impl Future<Output = Result<Vc<ModuleResolveResult>>> + Send

Resolve to an asset from that origin. Custom resolve options can be passed. Otherwise provide origin.resolve_options() unmodified.

Source

fn resolve_options( self: Vc<Self>, reference_type: Value<ReferenceType>, ) -> Vc<ResolveOptions>

Get the resolve options that apply for this origin.

Source

fn with_transition( self: ResolvedVc<Self>, transition: RcStr, ) -> Vc<Box<dyn ResolveOrigin>>

Adds a transition that is used for resolved assets.

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§