Skip to main content

Transition

Trait Transition 

Source
pub trait Transition:
    Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Provided methods
    fn process_source(
        self: Vc<Self>,
        asset: Vc<Box<dyn Source>>,
    ) -> Vc<Box<dyn Source>>
       where Self: Sized { ... }
    fn process_compile_time_info(
        self: Vc<Self>,
        compile_time_info: Vc<CompileTimeInfo>,
    ) -> Vc<CompileTimeInfo>
       where Self: Sized { ... }
    fn process_module_options_context(
        self: Vc<Self>,
        module_options_context: Vc<ModuleOptionsContext>,
    ) -> Vc<ModuleOptionsContext>
       where Self: Sized { ... }
    fn process_resolve_options_context(
        self: Vc<Self>,
        resolve_options_context: Vc<ResolveOptionsContext>,
    ) -> Vc<ResolveOptionsContext>
       where Self: Sized { ... }
    fn process_transition_options(
        self: Vc<Self>,
        transition_options: Vc<TransitionOptions>,
    ) -> Vc<TransitionOptions>
       where Self: Sized { ... }
    fn process_module(
        self: Vc<Self>,
        module: Vc<Box<dyn Module>>,
        _context: Vc<ModuleAssetContext>,
    ) -> Vc<Box<dyn Module>>
       where Self: Sized { ... }
    fn process_context(
        self: Vc<Self>,
        module_asset_context: Vc<ModuleAssetContext>,
    ) -> Vc<ModuleAssetContext>
       where Self: Sized { ... }
    fn process(
        self: Vc<Self>,
        source: Vc<Box<dyn Source>>,
        module_asset_context: Vc<ModuleAssetContext>,
        reference_type: ReferenceType,
    ) -> Vc<ProcessResult>
       where Self: Sized { ... }
}
Expand description

Some kind of operation that is executed during reference processing. e. g. you can transition to a different environment on a specific import (reference).

Provided Methods§

Source

fn process_source( self: Vc<Self>, asset: Vc<Box<dyn Source>>, ) -> Vc<Box<dyn Source>>
where Self: Sized,

Apply modifications/wrapping to the source asset

Source

fn process_compile_time_info( self: Vc<Self>, compile_time_info: Vc<CompileTimeInfo>, ) -> Vc<CompileTimeInfo>
where Self: Sized,

Apply modifications to the compile-time information

Source

fn process_module_options_context( self: Vc<Self>, module_options_context: Vc<ModuleOptionsContext>, ) -> Vc<ModuleOptionsContext>
where Self: Sized,

Apply modifications/wrapping to the module options context

Source

fn process_resolve_options_context( self: Vc<Self>, resolve_options_context: Vc<ResolveOptionsContext>, ) -> Vc<ResolveOptionsContext>
where Self: Sized,

Apply modifications/wrapping to the resolve options context

Source

fn process_transition_options( self: Vc<Self>, transition_options: Vc<TransitionOptions>, ) -> Vc<TransitionOptions>
where Self: Sized,

Apply modifications/wrapping to the transition options

Source

fn process_module( self: Vc<Self>, module: Vc<Box<dyn Module>>, _context: Vc<ModuleAssetContext>, ) -> Vc<Box<dyn Module>>
where Self: Sized,

Apply modifications/wrapping to the final asset

Source

fn process_context( self: Vc<Self>, module_asset_context: Vc<ModuleAssetContext>, ) -> Vc<ModuleAssetContext>
where Self: Sized,

Apply modifications to the context

Source

fn process( self: Vc<Self>, source: Vc<Box<dyn Source>>, module_asset_context: Vc<ModuleAssetContext>, reference_type: ReferenceType, ) -> Vc<ProcessResult>
where Self: Sized,

Apply modification on the processing of the asset

Trait Implementations§

Source§

impl Dynamic<Box<dyn Transition>> for Box<dyn Transition>

Source§

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

Available on debug-assertions enabled only.
Source§

impl TraitVtablePrototype for Box<dyn Transition>

Source§

const LEN: usize = 8usize

Source§

const DEFAULTS: &[Option<&NativeFunction>]

Source§

impl Upcast<Box<dyn Transition>> for Box<dyn Transition>

Source§

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

Available on debug-assertions enabled only.
Source§

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

Available on debug-assertions enabled only.
Source§

impl VcValueTrait for Box<dyn Transition>

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 Transition

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 Transition for FullContextTransition

Source§

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