Commit Graph
18 Commits
Author SHA1 Message Date
Evan Almloff b47a6cf83e Move to a generic GlobalLazy<T> (#2851)
* Expose a generic lazy type

* Switch to generic lazy globals

* simplify global lazy context a bit

* rename LazyGlobal to Global

* use Memo::global in more examples

* Fix soundness issue with deref_impl. It relies on the size of self, so it cannot be safe

* add a comment about safety

* Make clippy happy

* fix formatting

* Restore changes to signal impl

* Add helper methods for global signal and global memo to make getting the inner value easier
2024-08-16 17:57:41 -05:00
Jonathan Kelley e42b71b1ba Fix #2612: adjust readable trait to allow try_peek (#2714)
* Fix #2612: adjust readable trait to allow try_peek

Our implementation for Readable was inconsistent.
We had a try_unchecked variant for read but not for peek.
This resolves that by making a breaking change to the
Readable interface.

* fix doctests too
2024-07-26 18:20:16 -05:00
Evan Almloff 58f7efafea Make EventHandler copy (#2112)
* implement Copy for EventHandler
* implement from closure for event handler and remove special on prefix
* fix props implementation of EventHandler
2024-03-19 19:48:53 -07:00
Evan Almloff 60a84956d1 restore lifetime checking for signals 2024-03-08 10:32:57 -06:00
Evan Almloff 8689509eb5 erase the original readable type 2024-02-07 11:19:39 -06:00
Evan Almloff c8937cb4df make mapped signal readable 2024-02-07 09:35:06 -06:00
Evan Almloff 1af8f56e89 make target an associated type 2024-02-07 08:53:21 -06:00
Evan Almloff 51d7133ca5 add readable and writable traits for signal-like structs 2024-01-23 10:05:59 -06:00
Jonathan Kelley 079fec3be6 simplify generational box by compressing debug info 2024-01-22 21:17:02 -08:00
Evan Almloff e01f10e25d remove mappable and mappablemut traits 2024-01-22 16:51:25 -06:00
Evan Almloff b7c9817cf3 fix tests 2024-01-02 15:19:01 -06:00
Evan Almloff 73b7f450a5 fix merge errors 2024-01-02 14:55:46 -06:00
Evan Almloff b9d179c494 add as_mapped_ref 2024-01-01 10:44:21 -06:00
Evan Almloff 31489167f7 use map in the signal iterator 2023-12-23 13:52:23 -06:00
Evan Almloff a2fadc8d11 Make the function bounds for map less restrictive 2023-12-23 13:43:27 -06:00
Evan Almloff bfacf94db4 finish removing generic from SignalMap 2023-10-17 13:50:21 -05:00
Evan Almloff 365868f636 remove extra generic from SignalMap 2023-10-17 13:45:25 -05:00
Evan Almloff 3578f03f4f add the ability to map signals 2023-10-11 12:43:22 -05:00