use crate::{errors::VetisError, Request, Response};
use std::{future::Future, pin::Pin, sync::Arc};
pub trait Path: Sync + Send {
fn uri(&self) -> &str;
fn handle<'a>(
&'a self,
request: Request,
uri: Arc<String>,
) -> Pin<Box<dyn Future<Output = Result<Response, VetisError>> + Send + 'a>>;
}
#[typetag::serde]
pub trait PathConfig: Send + Sync {
fn uri(&mut self, value: &str);
}