make mapped signal readable

This commit is contained in:
Evan Almloff committed 2024-02-07 09:35:06 -06:00
1 parent 1af8f56e89
commit c8937cb4df
8 files changed
+176 -126

No files matched your search

+2 -8
View File
@@ -1,6 +1,6 @@
use crate::{
read::Readable, write::Writable, CopyValue, GlobalMemo, GlobalSignal, MappedSignal,
ReactiveContext, ReadOnlySignal,
read::Readable, write::Writable, CopyValue, GlobalMemo, GlobalSignal, ReactiveContext,
ReadOnlySignal,
};
use dioxus_core::{
prelude::{flush_sync, spawn, IntoAttributeValue},
@@ -187,12 +187,6 @@ impl<T: 'static, S: Storage<SignalData<T>>> Signal<T, S> {
}
}
/// Map the signal to a new type.
pub fn map<O>(self, f: impl Fn(&T) -> &O + 'static) -> MappedSignal<S::Ref<O>> {
// MappedSignal::new(self, f)
todo!()
}
/// Get the generational id of the signal.
pub fn id(&self) -> generational_box::GenerationalBoxId {
self.inner.id()