Skip to main content

ForLifetimeTable

Trait ForLifetimeTable 

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

    // Required method
    fn with_lt<'lt>(self, marker: &mut WithLtMarker) -> Self::WithLt<'lt>;
}
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<'lt>.

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

Required Associated Types§

Source

type WithLt<'lt>: ForLifetimeTable + Table<'lt> + 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.

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.

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>

Implementors§

Source§

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

Source§

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

Source§

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

Source§

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

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>, A: Value, B: Value, C: Value,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

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>