Skip to main content

EcmascriptHmrChunkContent

Trait EcmascriptHmrChunkContent 

Source
pub trait EcmascriptHmrChunkContent:
    VersionedContent
    + Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required methods
    fn entries(self: Vc<Self>) -> Vc<EcmascriptChunkContentEntries>
       where Self: Sized;
    fn ecmascript_chunk_version(self: Vc<Self>) -> Vc<EcmascriptChunkVersion>
       where Self: Sized;
}
Expand description

An Ecmascript chunk content that participates in HMR.

Exists so the version/diff/merge machinery can be written once against the trait rather than duplicated per runtime. The turbo-tasks value types cannot be generic, so the runtimes keep their own content structs and implement this to expose the two things the shared machinery needs.

Required Methods§

Source

fn entries(self: Vc<Self>) -> Vc<EcmascriptChunkContentEntries>
where Self: Sized,

The per-module code and hashes making up this chunk.

Source

fn ecmascript_chunk_version(self: Vc<Self>) -> Vc<EcmascriptChunkVersion>
where Self: Sized,

The same value as [VersionedContent::version], but with the concrete type the diffing machinery needs instead of Box<dyn Version>.

Trait Implementations§

Source§

impl Dynamic<Box<dyn EcmascriptHmrChunkContent>> for Box<dyn EcmascriptHmrChunkContent>

Source§

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

Available on debug-assertions enabled only.
Source§

impl Dynamic<Box<dyn VersionedContent>> for Box<dyn EcmascriptHmrChunkContent>

Source§

impl TraitVtablePrototype for Box<dyn EcmascriptHmrChunkContent>

Source§

const LEN: usize = 2usize

Source§

const DEFAULTS: &[Option<&NativeFunction>]

Source§

impl Upcast<Box<dyn EcmascriptHmrChunkContent>> for Box<dyn EcmascriptHmrChunkContent>

Source§

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

Available on debug-assertions enabled only.
Source§

impl Upcast<Box<dyn VersionedContent>> for Box<dyn EcmascriptHmrChunkContent>

Source§

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

Available on debug-assertions enabled only.
Source§

impl UpcastStrict<Box<dyn VersionedContent>> for Box<dyn EcmascriptHmrChunkContent>

Source§

impl VcValueTrait for Box<dyn EcmascriptHmrChunkContent>

Source§

const IMPL_VTABLES: &'static VTableRegistry<Self::ValueTrait>

The per-trait vtable registry, populated by [crate::value_type::register_all_trait_methods] Read more
Source§

type ValueTrait = dyn EcmascriptHmrChunkContent

Source§

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".

Implementors§

Source§

impl<T> EcmascriptHmrChunkContent for T
where T: Dynamic<Box<dyn EcmascriptHmrChunkContent>> + VersionedContent + Send + Sync + NonLocalValue + ValueDebug,