pub enum Loaded<'a, V> {
Nothing,
Loading {
previous: Option<&'a V>,
},
Ready(&'a V),
Failed(&'a str),
}Expand description
What Latest::want has to show.
Variants§
Nothing
No key is asked for.
Loading
The key’s load is not done; previous is the last value received,
to show dimmed instead of a blank.
Ready(&'a V)
The key’s value.
Failed(&'a str)
The key’s load panicked: the panic’s message.
Trait Implementations§
Auto Trait Implementations§
impl<'a, V> Freeze for Loaded<'a, V>
impl<'a, V> RefUnwindSafe for Loaded<'a, V>where
V: RefUnwindSafe,
impl<'a, V> Send for Loaded<'a, V>where
V: Sync,
impl<'a, V> Sync for Loaded<'a, V>where
V: Sync,
impl<'a, V> Unpin for Loaded<'a, V>
impl<'a, V> UnsafeUnpin for Loaded<'a, V>
impl<'a, V> UnwindSafe for Loaded<'a, V>where
V: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more