diff --git a/proxmox-router/src/rpc_environment.rs b/proxmox-router/src/rpc_environment.rs index 476c0d41..8ce2d99d 100644 --- a/proxmox-router/src/rpc_environment.rs +++ b/proxmox-router/src/rpc_environment.rs @@ -5,12 +5,17 @@ use serde_json::Value; /// Helper to get around `RpcEnvironment: Sized` pub trait AsAny { fn as_any(&self) -> &(dyn Any + Send); + fn as_any_mut(&mut self) -> &mut (dyn Any + Send); } impl AsAny for T { fn as_any(&self) -> &(dyn Any + Send) { self } + + fn as_any_mut(&mut self) -> &mut (dyn Any + Send) { + self + } } /// Abstract Interface for API methods to interact with the environment