simplify reactive context and expose less signal internals
This commit is contained in:
1 parent
8324f5290a
commit
30bac267c9
7 files changed
+53
-81
No files matched your search
@@ -66,8 +66,8 @@ impl<T: PartialEq + 'static> Readable<T> for GlobalMemo<T> {
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
fn read(&self) -> Self::Ref<T> {
|
||||
self.signal().read()
|
||||
fn try_read(&self) -> Result<Self::Ref<T>, generational_box::BorrowError> {
|
||||
self.signal().try_read()
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
|
||||
@@ -89,8 +89,8 @@ impl<T: 'static> Readable<T> for GlobalSignal<T> {
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
fn read(&self) -> Self::Ref<T> {
|
||||
self.signal().read()
|
||||
fn try_read(&self) -> Result<Self::Ref<T>, generational_box::BorrowError> {
|
||||
self.signal().try_read()
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
|
||||
Reference in new issue
Block a user