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
Trait Implementations§
Source§impl VcValueTrait for Box<dyn ResolveOrigin>
impl VcValueTrait for Box<dyn ResolveOrigin>
type ValueTrait = dyn ResolveOrigin
Source§fn get_trait_type_id() -> TraitTypeId
fn get_trait_type_id() -> TraitTypeId
Returns the type id of the trait object.
Source§fn get_impl_vtables() -> &'static VTableRegistry<Self::ValueTrait>
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.