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>
type ValueTrait = dyn Source
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.