pub trait HasLoadingHint: Clone + 'static {
// Required method
fn empty() -> Self;
}Expand description
Optional payload for the Loading state.
Most users will leave this at the default () — the variant
then carries no information beyond “we’re fetching”. Implement
this trait for your loading-hint type to attach stale-while-
revalidate metadata (last-known data, fetched-at timestamp, …)
to the Loading arm.
The trait has a single associated constant — a zero-sized marker so the type can be used as a default type parameter — and one method that produces the “no prior data, no hint” sentinel.
Required Methods§
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 HasLoadingHint for ()
Implements impl HasLoadingHint for ().
impl HasLoadingHint for ()
Implements impl HasLoadingHint for ().