pub trait NonLendingHook: Hook + for<'hook> HookValue<'hook, Value = Self::NonGenericValue> {
type NonGenericValue;
}
Expand description
NonLendingHook
is a subset of Hook
.
Value
of NonLendingHook
is not generic,
thus not borrowing from the hook.
In other words, NonLendingHook
doesn’t lend to its Value
.
Hook
is like a LendingAsyncIterator
,
NonLendingHook
is like an AsyncIterator
(also known as Stream
).
You can run
hook.into_values()
and hook.values()
to get a stream of values from a hook.
Required Associated Types§
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.