pub enum ImageState<'a> {
Ready,
Loading,
Failed(&'a str),
}Expand description
Where an Image’s pixels are: here, on their way, or never coming.
Three and not 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§
Ready
The pixels are here.
Loading
In flight, or being decoded; a later frame will have them. Image::network
reports this while it fetches, and Image::memory while a large picture decodes.
Failed(&'a str)
They will not arrive, and this is why.
Trait Implementations§
impl<'a> Copy for State<'a>
impl<'a> Eq for State<'a>
impl<'a> StructuralPartialEq for State<'a>
Auto Trait Implementations§
impl<'a> Freeze for State<'a>
impl<'a> RefUnwindSafe for State<'a>
impl<'a> Send for State<'a>
impl<'a> Sync for State<'a>
impl<'a> Unpin for State<'a>
impl<'a> UnsafeUnpin for State<'a>
impl<'a> UnwindSafe for State<'a>
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