pub trait AliasSource {
    type Target;

    const NAME: &'static str;

    fn target(&self) -> &Self::Target;
}
Expand description

Types created by the alias! macro that serve to distinguish between aliases implement this trait.

In order to be able to implement within diesel a lot of traits on what will represent the alias, we cannot use directly that new type within the query builder. Instead, we will use Alias<S>, where S: AliasSource.

This trait should never be implemented by an end-user directly.

Required Associated Types§

The table the alias maps to

Required Associated Constants§

The name of this alias in the query

Required Methods§

Obtain the table from the source

(used by Diesel to implement some traits)

Implementors§