1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use std::borrow::Cow;
use std::fmt;
#[derive(Debug)]
pub enum Reaction {
None,
Msg(Cow<'static, str>),
Msgs(Cow<'static, [Cow<'static, str>]>),
Reply(Cow<'static, str>),
Replies(Cow<'static, [Cow<'static, str>]>),
RawMsg(Cow<'static, str>),
Quit(Option<Cow<'static, str>>),
}
#[derive(Debug)]
pub enum ErrorReaction {
Proceed,
Quit(Option<Cow<'static, str>>),
}
#[derive(Clone, Debug)]
pub enum LibReaction<Msg>
where
Msg: Clone + fmt::Debug,
{
RawMsg(Msg),
Multi(Vec<LibReaction<Msg>>),
}