only give out a ReadOnlySignal from async resources
This commit is contained in:
1 parent
79501e43c1
commit
38bdab880d
1 file changed
+2
-2
@@ -95,8 +95,8 @@ impl<T> AsyncMemo<T> {
|
|||||||
/// Return any value, even old values if the future has not yet resolved.
|
/// Return any value, even old values if the future has not yet resolved.
|
||||||
///
|
///
|
||||||
/// If the future has never completed, the returned value will be `None`.
|
/// If the future has never completed, the returned value will be `None`.
|
||||||
pub fn value(&self) -> Option<Signal<T>> {
|
pub fn value(&self) -> Option<ReadOnlySignal<T>> {
|
||||||
self.value.cloned()
|
self.value.cloned().map(|sig| sig.into())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the ID of the future in Dioxus' internal scheduler
|
/// Get the ID of the future in Dioxus' internal scheduler
|
||||||
|
|||||||
Reference in new issue
Block a user