Struct Resource
pub struct Resource<T>where
T: 'static,{ /* private fields */ }
Expand description
Represents a asynchronous resource.
Implementations§
§impl<T> Resource<T>where
T: 'static,
impl<T> Resource<T>where
T: 'static,
pub fn is_loading(&self) -> bool
pub fn is_loading(&self) -> bool
Returns whether we are currently loading a new value or not.
Trait Implementations§
§impl<T> Deref for Resource<T>where
T: 'static,
impl<T> Deref for Resource<T>where
T: 'static,
Hijack deref so that we can track where the resource is being accessed.
impl<T> Copy for Resource<T>where
T: Copy + 'static,
Auto Trait Implementations§
impl<T> Freeze for Resource<T>
impl<T> !RefUnwindSafe for Resource<T>
impl<T> !Send for Resource<T>
impl<T> !Sync for Resource<T>
impl<T> Unpin for Resource<T>where
T: Unpin,
impl<T> !UnwindSafe for Resource<T>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)