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§
Sourcefn origin_path(self: Vc<Self>) -> Vc<FileSystemPath>where
Self: Sized,
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.
Sourcefn asset_context(self: Vc<Self>) -> Vc<Box<dyn AssetContext>>where
Self: Sized,
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§
Sourcefn get_inner_asset(self: Vc<Self>, request: Vc<Request>) -> Vc<OptionModule>where
Self: Sized,
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