blob: d1939a5416e0a02d3b91c1c4cfbe7be474f1bafe (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
use futures::future;
use crate::event::types;
pub fn messages() -> impl FnMut(&types::ChannelEvent) -> future::Ready<bool> {
|event| future::ready(matches!(event.data, types::ChannelEventData::Message(_)))
}
pub fn created() -> impl FnMut(&types::ChannelEvent) -> future::Ready<bool> {
|event| future::ready(matches!(event.data, types::ChannelEventData::Created(_)))
}
|