pub trait HookValue<'hook, ImplicitBounds: HookValueBounds<'hook, Self> = &'hook Self> {
type Value;
}
Expand description
A helper trait to define
lifetime generic associated types (lifetime-GAT)
for Hook
.
This trait follows the better GAT pattern.
better GAT is a pattern which implements lifetime-GAT without real GAT,
and it also solves some problems relating to for<'hook> HookValue<Value<'hook> = ...>
that real GAT currently doesn’t solve.
Please don’t impl this trait manually because in the future this will be changed to GAT.
Instead, use impl_hook![...];
.
Required Associated Types§
Sourcetype Value
type Value
The output type of Hook::use_hook
.
Please don’t use this associated type directly.
Instead, use Value![]
for future compatibility.
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.