Fix warnings and compile errors

This commit is contained in:
Jonathan Kelley committed 2024-02-03 13:10:16 -08:00
1 parent e767e49d5e
commit 7d78e5e250
7 files changed
+26 -241

No files matched your search

+5
View File
@@ -147,6 +147,11 @@ impl<T> Resource<T> {
self.state.into()
}
/// Get the current value of the future.
pub fn value(&self) -> Option<ReadOnlySignal<T>> {
self.value.peek().as_ref().map(|sig| sig.clone().into())
}
/// Wait for this async memo to resolve, returning the inner signal value
/// If the value is pending, returns none and suspends the current component
pub fn suspend(&self) -> Option<ReadOnlySignal<T>> {