diesel::query_source

Trait 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 Constants§

Source

const NAME: &'static str

The name of this alias in the query

Required Associated Types§

Source

type Target

The table the alias maps to

Required Methods§

Source

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

Obtain the table from the source

(used by Diesel to implement some traits)

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.

Implementors§