MB
Abortable<Future<Output = ()>>doesn't have a size known at compile-time
Size: a a a
MB
Abortable<Future<Output = ()>>MB
AT
K
AT
IB
IB
K
struct MegaTimer<F> {
future: Abortable<F>
abort_handle: AbortHandle,
}
async fn timer_future(...) -> MegaTimer<impl Future<Output = ()>> { .. }АГ
() )AT
struct MegaTimer<F> {
future: Abortable<F>
abort_handle: AbortHandle,
}
async fn timer_future(...) -> MegaTimer<impl Future<Output = ()>> { .. }
K

AT
K
State, то вероятно подобная проблема для *State типов уйдетK
AT
IB
AT
let bot = Bot::from_env("TG_TOKEN");
let start_state = State::default();let mut event_loop = bot.stateful_event_loop(start_state);
event_loop.command(…);
…
event_loop.polling().start().await.unwrap();AT
AT
IB