Trait ResolveOrigin

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

    // Provided method
    fn get_inner_asset(self: Vc<Self>, request: Vc<Request>) -> Vc<OptionModule>
       where Self: Sized { ... }
}
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: Vc<Self>) -> Vc<FileSystemPath>
where Self: Sized,

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: Vc<Self>) -> Vc<Box<dyn AssetContext>>
where Self: Sized,

The AssetContext that carries the configuration for building that subgraph.

Provided Methods§

Source

fn get_inner_asset(self: Vc<Self>, request: Vc<Request>) -> Vc<OptionModule>
where Self: Sized,

Get an inner asset form this origin that doesn’t require resolving but is directly attached

Trait Implementations§

Source§

impl VcValueTrait for Box<dyn ResolveOrigin>

Source§

type ValueTrait = dyn ResolveOrigin

Source§

fn get_trait_type_id() -> TraitTypeId

Returns the type id of the trait object.
Source§

fn get_impl_vtables() -> &'static VTableRegistry<Self::ValueTrait>

Returns the vtable for an implementation of this trait. Panics if ValueTypeId does not implement the trait.
Source§

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

Source§

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

Source§

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

Source§

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

Implementors§