immich-tools/src/actions/action.rs

11 lines
257 B
Rust

use crate::context::Context;
use color_eyre::eyre::Result;
pub trait Action {
type Input;
type Output;
fn new(input: Self::Input) -> Self;
fn describe(&self) -> String;
async fn execute(&self, ctx: &Context) -> Result<Self::Output>;
}