pub enum AssetState<A> {
Unloaded,
Loading,
Ready(Arc<A>),
Failed(Arc<Error>),
}Expand description
Observable shared lifecycle with its sticky result; observing never starts loading.
Variants§
Unloaded
No read or decode has begun.
Loading
One caller is reading/decoding; others join the same result.
Ready(Arc<A>)
An immutable decoded resource is available.
Failed(Arc<Error>)
A sticky diagnostic is available; failures are not retried implicitly.
Implementations§
Source§impl<A> AssetState<A>
impl<A> AssetState<A>
Sourcepub fn is_unloaded(&self) -> bool
pub fn is_unloaded(&self) -> bool
Whether no read or decode has begun.
Sourcepub fn is_loading(&self) -> bool
pub fn is_loading(&self) -> bool
Whether a decode is in progress.
Trait Implementations§
Source§impl<A> Clone for AssetState<A>
impl<A> Clone for AssetState<A>
Auto Trait Implementations§
impl<A> !RefUnwindSafe for AssetState<A>
impl<A> !UnwindSafe for AssetState<A>
impl<A> Forget for AssetState<A>
impl<A> Freeze for AssetState<A>
impl<A> Move for AssetState<A>
impl<A> Send for AssetState<A>
impl<A> Sync for AssetState<A>
impl<A> Unpin for AssetState<A>
impl<A> UnsafeUnpin for AssetState<A>where
Arc<A>: UnsafeUnpin,
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