Ashley Williams
3c62510e12
fix(clippy): appease
2022-12-16 07:56:49 -06:00
Josh Stone
d95ce1a293
Use Vec to implement the Events iterators
...
Using `vec::IntoIter` is much simpler than a deeply nested `Chain`,
compiling faster and avoiding the deeper recursion limit reported in
[rust#71359](https://github.com/rust-lang/rust/issues/71359 ).
2020-04-24 16:37:26 +01:00
Jonathan Kingston
62dd064f79
Add Send bound. Fixes #50
2019-05-28 16:30:53 +02:00
Bodil Stokke
5334d783f2
Use TryFrom rather than panicking From implementations to do attribute conversion.
...
Now that it's landed in stable and all.
2019-04-12 20:00:33 +01:00
Matthew Nicholson
2c500dc3f4
add tests for Events iterators
2019-04-01 00:46:46 -04:00
Matthew Nicholson
6f1021b4a3
implement `IntoIterator` for `Events`
2019-04-01 00:46:46 -04:00
Matthew Nicholson
d4aee284e5
add iter_mut method to events struct
2019-04-01 00:46:46 -04:00
Matthew Nicholson
b1d7f80dad
remove now unused `IntoEventHandler` trait
2019-04-01 00:46:46 -04:00
Matthew Nicholson
559359b2ff
add an iterator over all events
...
This iterator returns tuples conntaining the event name and whatever the
value is.
2019-04-01 00:46:46 -04:00
Matthew Nicholson
3edc4c3fa0
use generic events struct instead of `StringEvents`
...
This new structure is generic over any type that implents `From`/`Into`
for the type specified.
2019-03-31 02:04:30 -04:00
Bodil Stokke
dbb4ba8738
2018 edition.
2019-03-15 23:37:20 +00:00
Bodil Stokke
818c8ebdac
Make it generic on event type, determined by output type.
...
Unfortunately, this means the macro now requires a type annotation when
using event handlers.
Closes #6 , #17 .
2018-12-01 18:33:34 +00:00
David Tolnay
893566118d
Remove proc_macro_hygiene feature
2018-11-18 02:45:06 -08:00
Bodil Stokke
276ba31432
Documentation++.
2018-11-17 20:38:07 +00:00
Bodil Stokke
28513b93e9
Docs and cleanups.
2018-11-17 14:25:32 +00:00
Bodil Stokke
001a7ba016
Parameterise nodes etc on output type, so we can type event handlers based on it.
...
With this, Node<String> only accepts event handlers implemented
for String, etc. No danger of trying to stringify functions and vice versa.
2018-11-16 23:33:11 +00:00
Bodil Stokke
2b95530637
Better event handler conversion.
2018-11-16 00:34:13 +00:00
Bodil Stokke
a9dc58da9c
Event handlers!
2018-11-15 23:25:38 +00:00