Skip to main content

OutputAsset

Trait OutputAsset 

Source
pub trait OutputAsset:
    Asset
    + OutputAssetsReference
    + Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required method
    fn path(self: Vc<Self>) -> Vc<FileSystemPath>
       where Self: Sized;

    // Provided method
    fn path_string(self: Vc<Self>) -> Vc<RcStr>
       where Self: Sized { ... }
}
Expand description

An asset that should be outputted, e. g. written to disk or served from a server.

For documentation about where this is used and how it fits into the rest of Turbopack, see crate::_layers.

Required Methods§

Source

fn path(self: Vc<Self>) -> Vc<FileSystemPath>
where Self: Sized,

The identifier of the OutputAsset. It’s expected to be unique and capture all properties of the OutputAsset.

Provided Methods§

Source

fn path_string(self: Vc<Self>) -> Vc<RcStr>
where Self: Sized,

The identifier of the OutputAsset as string. It’s expected to be unique and capture all properties of the OutputAsset.

Trait Implementations§

Source§

impl TraitVtablePrototype for Box<dyn OutputAsset>

Source§

const LEN: usize = 2usize

Source§

const DEFAULTS: &[Option<&NativeFunction>]

Source§

impl VcValueTrait for Box<dyn OutputAsset>

Source§

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 more
Source§

type ValueTrait = dyn OutputAsset

Source§

fn get_trait_type_id() -> TraitTypeId

Returns the type id of the trait object.
Source§

impl Dynamic<Box<dyn Asset>> for Box<dyn OutputAsset>

Source§

impl Dynamic<Box<dyn OutputAsset>> for Box<dyn OutputAsset>

Source§

impl Dynamic<Box<dyn OutputAssetsReference>> for Box<dyn OutputAsset>

Source§

impl Dynamic<Box<dyn ValueDebug>> for Box<dyn OutputAsset>

Available on debug-assertions enabled only.
Source§

impl Upcast<Box<dyn Asset>> for Box<dyn OutputAsset>

Source§

impl Upcast<Box<dyn OutputAsset>> for Box<dyn OutputAsset>

Source§

impl Upcast<Box<dyn OutputAssetsReference>> for Box<dyn OutputAsset>

Source§

impl Upcast<Box<dyn ValueDebug>> for Box<dyn OutputAsset>

Available on debug-assertions enabled only.
Source§

impl UpcastStrict<Box<dyn Asset>> for Box<dyn OutputAsset>

Source§

impl UpcastStrict<Box<dyn OutputAssetsReference>> for Box<dyn OutputAsset>

Source§

impl UpcastStrict<Box<dyn ValueDebug>> for Box<dyn OutputAsset>

Available on debug-assertions enabled only.

Implementors§