Skip to main content

Cons

Struct Cons 

Source
pub struct Cons<Head, Tail>(/* private fields */);
Expand description

A non-empty scope: Head joined with nullability tracked in TableSlot, followed by the rest of the scope in Tail. Most recently joined table first, which is the order a hand-written Scope alias has to be spelled in.

Known limitation: a table appears at most once, and uniqueness is by marker type, not by SQL name. Joining one marker twice is reported later, as an inference ambiguity the first time a column of it is referenced; two different markers that share a Table::NAME are not caught at all and render FROM "t" JOIN "t". Two schemas must not name the same table.

Trait Implementations§

Source§

impl<C: ColumnKey, Tail, Scope, Idx> ColumnList<Scope, Idx> for Cons<Column<C>, Tail>
where Column<C>: RowField<Scope, Idx>, Tail: ColumnList<Scope, Idx>,

Source§

type Fields<T> = RowCons<C, <Column<C> as RowField<Scope, Idx>>::Value, <Tail as ColumnList<Scope, Idx>>::Fields<T>>

Source§

fn push_items(out: &mut Vec<SelectItem>)

Source§

impl<Head, Tail: Concat<Other>, Other> Concat<Other> for Cons<Head, Tail>

Source§

type Output = Cons<Head, <Tail as Concat<Other>>::Output>

Source§

impl<T: Table, N: Nullability, Tail> Find<T, Here> for Cons<TableSlot<T, N>, Tail>

Source§

type Nullability = N

The nullability T has in this scope (derived from how it was joined, not asserted manually).
Source§

impl<T: Table, Head, Tail, I> Find<T, There<I>> for Cons<Head, Tail>
where Tail: Find<T, I>,

Source§

type Nullability = <Tail as Find<T, I>>::Nullability

The nullability T has in this scope (derived from how it was joined, not asserted manually).
Source§

impl<T: Table, N: Nullability, Tail: MapNullable> MapNullable for Cons<TableSlot<T, N>, Tail>

Source§

impl<T: Table, N: Nullability, Tail: ScopeTables> ScopeTables for Cons<TableSlot<T, N>, Tail>

Source§

type Tables = Cons<T, <Tail as ScopeTables>::Tables>

Auto Trait Implementations§

§

impl<Head, Tail> Freeze for Cons<Head, Tail>

§

impl<Head, Tail> RefUnwindSafe for Cons<Head, Tail>

§

impl<Head, Tail> Send for Cons<Head, Tail>

§

impl<Head, Tail> Sync for Cons<Head, Tail>

§

impl<Head, Tail> Unpin for Cons<Head, Tail>

§

impl<Head, Tail> UnsafeUnpin for Cons<Head, Tail>

§

impl<Head, Tail> UnwindSafe for Cons<Head, Tail>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<S, Head, Tail, IdxHead, IdxsTail> Superset<Cons<Head, Tail>, Cons<IdxHead, IdxsTail>> for S
where Head: Table, S: Find<Head, IdxHead> + Superset<Tail, IdxsTail>,

Source§

impl<S> Superset<Nil, Nil> for S

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WrapNullable<NotNull> for T