pub struct Resource<T: Clone + PartialEq + 'static> { /* private fields */ }Implementations§
Source§impl<T: Clone + PartialEq + 'static> Resource<T>
impl<T: Clone + PartialEq + 'static> Resource<T>
pub fn new() -> Self
pub fn with_initial(initial: T) -> Self
pub fn state(&self) -> Signal<AsyncState<T>>
pub fn generation(&self) -> u64
pub fn begin_loading(&self) -> u64
pub fn complete(&self, generation: u64, value: T)
pub fn fail(&self, generation: u64, error: impl Into<String>)
pub fn cancel(&self)
pub fn reset(&self)
pub fn is_loading(&self) -> bool
pub fn data_untracked(&self) -> Option<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Resource<T>
impl<T> !Send for Resource<T>
impl<T> !Sync for Resource<T>
impl<T> !UnwindSafe for Resource<T>
impl<T> Freeze for Resource<T>
impl<T> Unpin for Resource<T>
impl<T> UnsafeUnpin 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