pub trait Source:
Asset
+ Send
+ Sync
+ NonLocalValue
+ ValueDebug {
// Required methods
fn ident(self: Vc<Self>) -> Vc<AssetIdent>
where Self: Sized;
fn description(self: Vc<Self>) -> Vc<RcStr>
where Self: Sized;
}Expand description
Unparsed input source code. Source code is processed into Modules by the AssetContext.
All Sources have content and an identifier.
For documentation about where this is used and how it fits into the rest of Turbopack, see
crate::_layers.
Required Methods§
Sourcefn description(self: Vc<Self>) -> Vc<RcStr>where
Self: Sized,
fn description(self: Vc<Self>) -> Vc<RcStr>where
Self: Sized,
A human-readable description of this source, explaining where the code
comes from. For sources that transform another source, this should
include the inner source’s description, creating a readable chain
like "loaders [sass-loader] transform of file content of ./styles.scss".
Trait Implementations§
Source§impl VcValueTrait for Box<dyn Source>
impl VcValueTrait for Box<dyn Source>
Source§const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>
The per-trait vtable registry, populated at program load by
#[ctor::ctor]
functions emitted by each #[turbo_tasks::value_impl] expansion. Read moretype ValueTrait = dyn Source
Source§fn get_trait_type_id() -> TraitTypeId
fn get_trait_type_id() -> TraitTypeId
Returns the type id of the trait object.
impl Dynamic<Box<dyn Asset>> for Box<dyn Source>
impl Dynamic<Box<dyn Source>> for Box<dyn Source>
impl Dynamic<Box<dyn ValueDebug>> for Box<dyn Source>
Available on debug-assertions enabled only.
impl Upcast<Box<dyn Asset>> for Box<dyn Source>
impl Upcast<Box<dyn Source>> for Box<dyn Source>
impl Upcast<Box<dyn ValueDebug>> for Box<dyn Source>
Available on debug-assertions enabled only.
impl UpcastStrict<Box<dyn Asset>> for Box<dyn Source>
impl UpcastStrict<Box<dyn ValueDebug>> for Box<dyn Source>
Available on debug-assertions enabled only.