pub trait AliasExt: Sized {
// Provided method
fn alias(self, name: &'static str) -> AliasedExpr<Self> { ... }
}Expand description
Extension trait providing .alias() method syntax on any expression.
This is a blanket impl on all Sized types. The AliasedExpr it creates
is only useful when the inner type implements ToSQL/Expr/ExprValueType,
so calling .alias() on non-SQL types is harmless but useless.
For SQL<'a, V> values, the inherent SQL::alias() method takes
precedence and returns SQL<'a, V> (no type preservation needed for raw SQL).
Provided Methods§
fn alias(self, name: &'static str) -> AliasedExpr<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".