@@ -73,9 +73,9 @@ pub enum WebhookServerError {
7373/// let webhook_server = WebhookServer::new(webhook_options, webhooks).await.unwrap();
7474/// # }
7575/// ```
76- pub struct WebhookServer {
76+ pub struct WebhookServer < ' a > {
7777 options : WebhookServerOptions ,
78- webhooks : Vec < Box < dyn Webhook > > ,
78+ webhooks : Vec < & ' a mut dyn Webhook > ,
7979 tls_server : TlsServer ,
8080 cert_rx : mpsc:: Receiver < Certificate > ,
8181}
@@ -92,7 +92,7 @@ pub struct WebhookServerOptions {
9292 pub webhook_service_name : String ,
9393}
9494
95- impl WebhookServer {
95+ impl < ' a > WebhookServer < ' a > {
9696 /// The default HTTPS port
9797 pub const DEFAULT_HTTPS_PORT : u16 = 8443 ;
9898 /// The default IP address [`Ipv4Addr::UNSPECIFIED`] (`0.0.0.0`) the webhook server binds to,
@@ -111,7 +111,7 @@ impl WebhookServer {
111111 /// Please read their documentation for details.
112112 pub async fn new (
113113 options : WebhookServerOptions ,
114- webhooks : Vec < Box < dyn Webhook > > ,
114+ webhooks : Vec < & ' a mut dyn Webhook > ,
115115 ) -> Result < Self > {
116116 tracing:: trace!( "create new webhook server" ) ;
117117
0 commit comments