diff --git a/proxmox-api/src/router.rs b/proxmox-api/src/router.rs index ff9b637f..77dec989 100644 --- a/proxmox-api/src/router.rs +++ b/proxmox-api/src/router.rs @@ -32,16 +32,16 @@ pub enum SubRoute { #[derive(Default)] pub struct Router { /// The `GET` http method. - pub get: Option<&'static dyn ApiMethodInfo>, + pub get: Option<&'static (dyn ApiMethodInfo + Send + Sync)>, /// The `PUT` http method. - pub put: Option<&'static dyn ApiMethodInfo>, + pub put: Option<&'static (dyn ApiMethodInfo + Send + Sync)>, /// The `POST` http method. - pub post: Option<&'static dyn ApiMethodInfo>, + pub post: Option<&'static (dyn ApiMethodInfo + Send + Sync)>, /// The `DELETE` http method. - pub delete: Option<&'static dyn ApiMethodInfo>, + pub delete: Option<&'static (dyn ApiMethodInfo + Send + Sync)>, /// Specifies the behavior of sub directories. See [`SubRoute`]. pub subroute: Option>, @@ -113,7 +113,7 @@ where /// Builder method to provide a `GET` method info. pub fn get(mut self, method: &'static I) -> Self where - I: ApiMethodInfo, + I: ApiMethodInfo + Send + Sync, { self.get = Some(method); self @@ -122,7 +122,7 @@ where /// Builder method to provide a `PUT` method info. pub fn put(mut self, method: &'static I) -> Self where - I: ApiMethodInfo, + I: ApiMethodInfo + Send + Sync, { self.put = Some(method); self @@ -131,7 +131,7 @@ where /// Builder method to provide a `POST` method info. pub fn post(mut self, method: &'static I) -> Self where - I: ApiMethodInfo, + I: ApiMethodInfo + Send + Sync, { self.post = Some(method); self @@ -140,7 +140,7 @@ where /// Builder method to provide a `DELETE` method info. pub fn delete(mut self, method: &'static I) -> Self where - I: ApiMethodInfo, + I: ApiMethodInfo + Send + Sync, { self.delete = Some(method); self