Trait AliasTemplate

Source
pub trait AliasTemplate {
    type Output<'a>
       where Self: 'a;

    // Required methods
    fn convert(&self) -> Self::Output<'_>;
    fn replace<'a>(&'a self, capture: &Pattern) -> Self::Output<'a>;
}
Expand description

A trait for types that can be used as a template for an alias.

Required Associated Types§

Source

type Output<'a> where Self: 'a

The type of the output of the replacement.

Required Methods§

Source

fn convert(&self) -> Self::Output<'_>

Turn self into a Self::Output

Source

fn replace<'a>(&'a self, capture: &Pattern) -> Self::Output<'a>

Replaces capture within self.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl AliasTemplate for ResolvedVc<ImportMapping>

Source§

type Output<'a> = <Vc<ImportMapping> as AliasTemplate>::Output<'a>

Source§

fn convert(&self) -> Self::Output<'_>

Source§

fn replace<'a>(&'a self, capture: &Pattern) -> Self::Output<'a>

Source§

impl AliasTemplate for Vc<ImportMapping>

Source§

type Output<'a> = Pin<Box<dyn Future<Output = Result<ResolvedVc<ReplacedImportMapping>, Error>> + Send + 'a>>

Source§

fn convert(&self) -> Self::Output<'_>

Source§

fn replace<'a>(&'a self, capture: &Pattern) -> Self::Output<'a>

Implementors§

Source§

impl AliasTemplate for SubpathValue

Source§

type Output<'a> = Result<ReplacedSubpathValue, Error> where Self: 'a