Move cancellable to the type system and implement multi-parenting #1
Нет рецензентов
Метки
Нет меток
Нет этапа
Нет проекта
Нет назначенных
2 участников
Уведомления
Срок выполнения
Срок выполнения не установлен.
Зависимости
Зависимостей нет.
Ссылка: SoniEx2/rust.eventbus#1
Загрузка…
Создание таблицы
Сослаться в новой задаче
Описание отсутствует.
Удалить ветвь «dgriffen/rust.eventbus:dev/dgriffen/type-cancel»
Удаление ветви необратимо. Несмотря на то, что удаленная ветвь может просуществовать некоторое время перед тем, как она будет окончательно удалена, это действие НЕВОЗМОЖНО отменить в большинстве случаев. Продолжить?
The dyn_events test was changed to produce the output requested in your sample here: https://bpaste.net/show/73d5e4bc55b4
This is the output produced when run with
cargo test -- --nocaptureThe output requested in my sample should be done as a separate test. And it should use asserts somehow.
This also doesn't respect the hook priorities correctly.
Hook priorities is quite a large problem with the way this system is implemented. Rust really doesn't have a good built-in system for dynamic typing and downcasting which will have to be done in order to respect hook priorities since we'll be mixing up handlers a lot.
Some way to generate identifiers (for use in a large enum or somesuch) would work just as well, I think, altho I'm not quite sure how to do that.
Ah yes, having the macro generate an enum large enough for each type would probably work great. I'm not sure if Rust supports turning a
tyinto anidentthough.Запрос на слияние закрыт