Trait diesel::query_source::AliasSource

source ·
pub trait AliasSource {
    type Target;

    const NAME: &'static str;

    // Required method
    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§

source

type Target

The table the alias maps to

Required Associated Constants§

source

const NAME: &'static str

The name of this alias in the query

Required Methods§

source

fn target(&self) -> &Self::Target

Obtain the table from the source

(used by Diesel to implement some traits)

Object Safety§

This trait is not object safe.

Implementors§