use axum::{extract::State, http::StatusCode, routing::post, Router}; use crate::display::Wrapper; use std::sync::{Arc, Mutex}; #[derive(Clone)] struct ApiContext { display: Arc>, } /// API routes for axum /// Start with the basics: Send an image, crop it, dither, and upload. /// we defer the upload to a separate task. pub fn router() -> Router { Router::new() .route("/setimage", post(set_image)) } async fn set_image(State(ctx): State) { }