Trait Module

Source
pub trait Module:
    Asset
    + Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required method
    fn ident(self: Vc<Self>) -> Vc<AssetIdent>
       where Self: Sized;

    // Provided methods
    fn references(self: Vc<Self>) -> Vc<ModuleReferences>
       where Self: Sized { ... }
    fn is_self_async(self: Vc<Self>) -> Vc<bool>
       where Self: Sized { ... }
    fn style_type(self: Vc<Self>) -> Vc<OptionStyleType>
       where Self: Sized { ... }
}
Expand description

A module. This usually represents parsed source code, which has references to other modules.

Required Methods§

Source

fn ident(self: Vc<Self>) -> Vc<AssetIdent>
where Self: Sized,

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

Provided Methods§

Source

fn references(self: Vc<Self>) -> Vc<ModuleReferences>
where Self: Sized,

Other Modules or [OutputAsset]s referenced from this Module.

Source

fn is_self_async(self: Vc<Self>) -> Vc<bool>
where Self: Sized,

Signifies the module itself is async, e.g. it uses top-level await, is a wasm module, etc.

Source

fn style_type(self: Vc<Self>) -> Vc<OptionStyleType>
where Self: Sized,

The style type of the module.

Trait Implementations§

Implementors§