Skip to main content

ResolveOrigin

Trait ResolveOrigin 

Source
pub trait ResolveOrigin:
    Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required methods
    fn origin_path(&self) -> FileSystemPath;
    fn asset_context(&self) -> ResolvedVc<Box<dyn AssetContext>>;

    // Provided method
    fn resolve_options(&self) -> Vc<ResolveOptions> { ... }
}
Expand description

A location where resolving can occur from. It carries some meta information that are needed for resolving from here.

Required Methods§

Source

fn origin_path(&self) -> FileSystemPath

The origin path where resolving starts. This is pointing to a file, since that might be needed to infer custom resolving options for that specific file. But usually only the directory is relevant for the real resolving.

Source

fn asset_context(&self) -> ResolvedVc<Box<dyn AssetContext>>

The AssetContext that carries the configuration for building that subgraph.

Provided Methods§

Source

fn resolve_options(&self) -> Vc<ResolveOptions>

Get the resolve options that apply for this origin.

Trait Implementations§

Source§

impl TraitVtablePrototype for Box<dyn ResolveOrigin>

Source§

const LEN: usize = 0usize

Source§

const DEFAULTS: &[Option<&NativeFunction>]

Source§

impl VcValueTrait for Box<dyn ResolveOrigin>

Source§

const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>

The per-trait vtable registry, populated by [crate::value_type::register_all_trait_methods] Read more
Source§

type ValueTrait = dyn ResolveOrigin

Source§

fn get_trait_type_id() -> TraitTypeId

Returns the type id of the trait object.
Source§

impl Dynamic<Box<dyn ResolveOrigin>> for Box<dyn ResolveOrigin>

Source§

impl Dynamic<Box<dyn ValueDebug>> for Box<dyn ResolveOrigin>

Available on debug-assertions enabled only.
Source§

impl Upcast<Box<dyn ResolveOrigin>> for Box<dyn ResolveOrigin>

Source§

impl Upcast<Box<dyn ValueDebug>> for Box<dyn ResolveOrigin>

Available on debug-assertions enabled only.
Source§

impl UpcastStrict<Box<dyn ValueDebug>> for Box<dyn ResolveOrigin>

Available on debug-assertions enabled only.

Implementors§

Source§

impl ResolveOrigin for PlainResolveOrigin

Source§

impl<T> ResolveOrigin for T
where T: Dynamic<Box<dyn ResolveOrigin>> + Send + Sync + NonLocalValue + ValueDebug,