ephemeris_forge_forgejo/operation/
deploy_keys.rs1use std::fmt;
2
3use crate::api::request::CreateKeyOption;
4
5#[derive(Clone, Debug, Eq, PartialEq)]
9pub enum Operation {
10 Create {
12 body: CreateKeyOption,
14 },
15 Delete {
17 id: i64,
19 title: String,
21 },
22}
23
24impl fmt::Display for Operation {
25 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
26 match self {
27 Self::Create { body } => write!(f, "deploy key {}", body.title),
28 Self::Delete { id: _, title } => write!(f, "deploy key {title}"),
29 }
30 }
31}