pub struct Resource<T: 'static, E: 'static> { /* private fields */ }Expand description
Data loaded asynchronously: resource or resource_on.
It fetches when created, again whenever its source changes, and on
refetch. A new fetch cancels the one in flight.
While it loads, the previous data stays available; an error keeps it
too, so a view can show both.
Implementations§
Trait Implementations§
impl<T: 'static, E: 'static> Copy for Resource<T, E>
Auto Trait Implementations§
impl<T, E> Forget for Resource<T, E>
impl<T, E> Freeze for Resource<T, E>
impl<T, E> Move for Resource<T, E>
impl<T, E> RefUnwindSafe for Resource<T, E>
impl<T, E> Send for Resource<T, E>
impl<T, E> Sync for Resource<T, E>
impl<T, E> Unpin for Resource<T, E>
impl<T, E> UnsafeUnpin for Resource<T, E>
impl<T, E> UnwindSafe for Resource<T, E>
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