euv-ui 0.18.36

Reusable UI component library for the euv framework, providing buttons, cards, modals, inputs, and more.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/// 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.
pub trait HasLoadingHint: Clone + 'static {
    /// The sentinel value representing "no prior data is available".
    /// `use_async` slots this in for the first render so that
    /// `.loading_hint()` always returns a usable value, even before
    /// the future has a chance to produce one.
    fn empty() -> Self;
}