add readable and writable traits for signal-like structs

This commit is contained in:
Evan Almloff committed 2024-01-23 10:05:59 -06:00
1 parent 93adb35cfa
commit 51d7133ca5
17 files changed
+756 -673

No files matched your search

-6
View File
@@ -162,12 +162,6 @@ impl<T: 'static, S: Storage<T>> CopyValue<T, S> {
///
/// Note: This is completely safe because the value is stored in a generational box. The lifetime that normally is passed to the returned reference is only used as a hint to user to prevent runtime overlapping borrow panics.
#[track_caller]
pub fn write_unchecked(&self) -> S::Mut<T> {
self.value.write()
}
/// Write the value. If the value has been dropped, this will panic.
#[track_caller]
pub fn write(&self) -> S::Mut<T> {
self.value.write()
}