pub enum Fetched {
Loading,
Ready(Arc<ImageData>),
Failed(String),
}Expand description
The image stores, for an application that loads its own pictures or sizes the cache. What is known about an image that has to be fetched before it can be shown.
Three states rather than two, because “not here yet” and “will never be here” are different answers and an interface shows them differently: one is a placeholder, the other is a message.
Variants§
Loading
In flight. Ask again on a later frame.
Ready(Arc<ImageData>)
Here.
Failed(String)
It will not arrive, and this is why.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Fetched
impl RefUnwindSafe for Fetched
impl Send for Fetched
impl Sync for Fetched
impl Unpin for Fetched
impl UnsafeUnpin for Fetched
impl UnwindSafe for Fetched
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