#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Part {
Inline,
Quiet,
Banner,
You,
Head,
Reasoning,
Tool,
Reply,
Note,
Ended,
Resolved,
Waiting,
Working,
Calling,
Asking,
Composer,
Menu,
}
impl Part {
pub const ALL: [Part; 17] = [
Part::Inline,
Part::Quiet,
Part::Banner,
Part::You,
Part::Head,
Part::Reasoning,
Part::Tool,
Part::Reply,
Part::Note,
Part::Ended,
Part::Resolved,
Part::Waiting,
Part::Working,
Part::Calling,
Part::Asking,
Part::Composer,
Part::Menu,
];
pub const fn number(self) -> u8 {
match self {
Part::Inline => 1,
Part::Quiet => 2,
Part::Banner => 10,
Part::You => 11,
Part::Head => 12,
Part::Reasoning => 13,
Part::Tool => 14,
Part::Reply => 15,
Part::Note => 16,
Part::Ended => 17,
Part::Resolved => 18,
Part::Waiting => 30,
Part::Working => 31,
Part::Calling => 32,
Part::Asking => 33,
Part::Composer => 34,
Part::Menu => 35,
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Outcome {
Answered,
Failed,
}
impl Outcome {
pub const ALL: [Outcome; 2] = [Outcome::Answered, Outcome::Failed];
pub const fn number(self) -> u8 {
match self {
Outcome::Answered => 0,
Outcome::Failed => 1,
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Ending {
Done,
Limit,
Cancelled,
}
impl Ending {
pub const ALL: [Ending; 3] = [Ending::Done, Ending::Limit, Ending::Cancelled];
pub const fn number(self) -> u8 {
match self {
Ending::Done => 0,
Ending::Limit => 1,
Ending::Cancelled => 2,
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Verdict {
Approved,
Denied,
}
impl Verdict {
pub const ALL: [Verdict; 2] = [Verdict::Approved, Verdict::Denied];
pub const fn number(self) -> u8 {
match self {
Verdict::Approved => 0,
Verdict::Denied => 1,
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Status {
Drawn,
Full,
Malformed,
}
impl Status {
pub const ALL: [Status; 3] = [Status::Drawn, Status::Full, Status::Malformed];
pub const fn number(self) -> u32 {
match self {
Status::Drawn => 0,
Status::Full => 1,
Status::Malformed => 2,
}
}
}