pub struct Labeled<K, Inner> { /* private fields */ }Expand description
A selected item filed under a LabelKey instead of under its own
identity, and rendered with that name as its AS.
Trait Implementations§
impl<K: Spelled, Inner> LookupKey for Labeled<K, Inner>
Source§impl<K: LabelKey, Inner: RowField<Scope, Idx>, Scope, Idx> RowField<Scope, Idx> for Labeled<K, Inner>
A label renames whatever it wraps and changes nothing else, so this is
one impl rather than one per selectable: the inner value decides the
scope check and the decoded type, the label decides the AS and the row
key.
impl<K: LabelKey, Inner: RowField<Scope, Idx>, Scope, Idx> RowField<Scope, Idx> for Labeled<K, Inner>
A label renames whatever it wraps and changes nothing else, so this is
one impl rather than one per selectable: the inner value decides the
scope check and the decoded type, the label decides the AS and the row
key.
type Value = <Inner as RowField<Scope, Idx>>::Value
Source§type Sql = <Inner as RowField<Scope, Idx>>::Sql
type Sql = <Inner as RowField<Scope, Idx>>::Sql
This field’s SQL type: the marker
Value has already resolved away
to a native Rust type. A single-column subquery (Select::contains)
needs this to compare its selected column against an outer
expression with expr::Comparable, which a native Value can’t do.fn item(&self) -> SelectItem
Source§impl<K, Inner, Scope, Idx> SelectionPart<Scope, Idx> for Labeled<K, Inner>
impl<K, Inner, Scope, Idx> SelectionPart<Scope, Idx> for Labeled<K, Inner>
Auto Trait Implementations§
impl<K, Inner> Freeze for Labeled<K, Inner>
impl<K, Inner> RefUnwindSafe for Labeled<K, Inner>
impl<K, Inner> Send for Labeled<K, Inner>
impl<K, Inner> Sync for Labeled<K, Inner>
impl<K, Inner> Unpin for Labeled<K, Inner>
impl<K, Inner> UnsafeUnpin for Labeled<K, Inner>
impl<K, Inner> UnwindSafe for Labeled<K, Inner>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more