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§
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 DataUriSource
impl Upcast<Box<dyn Source>> for FileSource
impl Upcast<Box<dyn Source>> for GeneratedCodeSource
impl Upcast<Box<dyn Source>> for Box<dyn Source>
impl Upcast<Box<dyn Source>> for VirtualSource
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 Source>> for DataUriSource
impl UpcastStrict<Box<dyn Source>> for FileSource
impl UpcastStrict<Box<dyn Source>> for GeneratedCodeSource
impl UpcastStrict<Box<dyn Source>> for VirtualSource
impl UpcastStrict<Box<dyn ValueDebug>> for Box<dyn Source>
Available on debug-assertions enabled only.
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 by [crate::value_type::register_all_trait_methods] Read more
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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".