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>,
        asset: 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>, asset: 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 VcValueTrait for Box<dyn Transition>

Source§

type ValueTrait = dyn Transition

Source§

fn get_trait_type_id() -> TraitTypeId

Returns the type id of the trait object.
Source§

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

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

Source§

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

Source§

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

Source§

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

Implementors§