ephemeris_forge_github/operation/
autolinks.rs1use std::fmt;
2
3use crate::Autolink;
4
5#[derive(Clone, Debug, Eq, PartialEq)]
7pub enum Operation {
8 Create {
10 key_prefix: String,
12 autolink: Autolink,
14 },
15 Delete {
17 key_prefix: String,
19 id: u64,
21 },
22}
23
24impl fmt::Display for Operation {
25 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
26 match self {
27 Self::Create {
28 key_prefix,
29 autolink: _,
30 }
31 | Self::Delete { key_prefix, id: _ } => write!(f, "autolink {key_prefix}"),
32 }
33 }
34}