Trait LifetimeHkt

Source
pub trait LifetimeHkt {
    type Actual<'x>: ?Sized;
}
Expand description

Represents a type parameterized by a single lifetime. The LifetimeHkt! macro is used to get an implementation of this trait.

Implements TypeFn when Actual<'x>: TypeFn.

For example, the following type:

use dynamic_provider::{LifetimeHkt, Value};

type MyTypeFn<T, U, V> = LifetimeHkt![
    for<'x> LifetimeHkt![
        for<'y> LifetimeHkt![
            for<'z> Value<(&'x T, &'y U, &'z V)>
        ]
    ]
];

is equivalent to: TypeFn![for<'x, 'y, 'z> (&'x T, &'y U, &'z V)].

Required Associated Types§

Source

type Actual<'x>: ?Sized

The described type, given lifetime parameter 'x.

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.

Implementors§