Skip to main content

ForLifetimeTable

Trait ForLifetimeTable 

Source
pub trait ForLifetimeTable {
    type WithLt<'lt>: ForLifetimeTable + Table + Sized;

    // Required methods
    fn with_lt<'lt>(self, marker: &mut WithLtMarker) -> Self::WithLt<'lt>;
    fn unwith_lt<'lt>(
        with_lt: Self::WithLt<'lt>,
        marker: &mut WithLtMarker,
    ) -> Self;
}
Expand description

A helper trait that allows us to talk about a Table with different lifetimes. Conceptually it is a type level function of lt -> T where T: Table.

If you implement Table on your type, you must also implement ForLifetimeTable.

Required Associated Types§

Source

type WithLt<'lt>: ForLifetimeTable + Table + Sized

Substitute the lifetime of this table with 'lt.

Required Methods§

Source

fn with_lt<'lt>(self, marker: &mut WithLtMarker) -> Self::WithLt<'lt>

Coerce the lifetime of this table. This is used internally by the library.

Source

fn unwith_lt<'lt>(with_lt: Self::WithLt<'lt>, marker: &mut WithLtMarker) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> ForLifetimeTable for (T₁, T₂, …, Tₙ)

This trait is implemented for tuples up to 15 items long.

Source§

type WithLt<'lt> = (<T as ForLifetimeTable>::WithLt<'lt>,)

Source§

fn with_lt<'lt>(self, marker: &mut WithLtMarker) -> Self::WithLt<'lt>

Source§

fn unwith_lt<'lt>(with_lt: Self::WithLt<'lt>, marker: &mut WithLtMarker) -> Self

Implementors§

Source§

impl<'scope, A, B, C> ForLifetimeTable for Three<'scope, ExprMode, A, B, C>
where for<'a> Three<'a, ExprMode, A, B, C>: Table, A: Value, B: Value, C: Value,

Source§

type WithLt<'lt> = Three<'lt, ExprMode, A, B, C>

Source§

impl<'scope, A, B> ForLifetimeTable for Two<'scope, ExprMode, A, B>
where for<'a> Two<'a, ExprMode, A, B>: Table, A: Value, B: Value,

Source§

type WithLt<'lt> = Two<'lt, ExprMode, A, B>

Source§

impl<'scope, A> ForLifetimeTable for One<'scope, ExprMode, A>
where for<'a> One<'a, ExprMode, A>: Table, A: Value,

Source§

type WithLt<'lt> = One<'lt, ExprMode, A>

Source§

impl<'scope, T: ForLifetimeTable + Table> ForLifetimeTable for ListTable<T>
where for<'lt> T::WithLt<'lt>: Table,

Source§

impl<'scope, T: ForLifetimeTable + Table> ForLifetimeTable for MaybeTable<'scope, T>
where for<'lt> T::WithLt<'lt>: Table,

Source§

type WithLt<'lt> = MaybeTable<'lt, <T as ForLifetimeTable>::WithLt<'lt>>

Source§

impl<'scope, T: ForLifetimeTable + Table> ForLifetimeTable for NullTable<'scope, T>
where for<'lt> T::WithLt<'lt>: Table,

Source§

type WithLt<'lt> = NullTable<'lt, <T as ForLifetimeTable>::WithLt<'lt>>

Source§

impl<'scope, T: Value> ForLifetimeTable for Expr<'scope, T>

Source§

type WithLt<'lt> = Expr<'lt, T>