From 58a6e5f5129c9e44ae03d49e256ce99174239ab0 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 1 Oct 2021 08:35:51 +0200 Subject: [PATCH] proxmox-rest-server: add comment why ApiService needs to be 'pub' --- proxmox-rest-server/src/rest.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/proxmox-rest-server/src/rest.rs b/proxmox-rest-server/src/rest.rs index 80ab0461..d56edb12 100644 --- a/proxmox-rest-server/src/rest.rs +++ b/proxmox-rest-server/src/rest.rs @@ -139,10 +139,14 @@ impl Service<&tokio::net::UnixStream> for RestServer { } } -/// Helper [Service] containing the peer Address -/// -/// The lower level connection [Service] implementation on -/// [RestServer] extracts the peer address and return an [ApiService]. +// Helper [Service] containing the peer Address +// +// The lower level connection [Service] implementation on +// [RestServer] extracts the peer address and return an [ApiService]. +// +// Rust wants this type 'pub' here (else we get 'private type `ApiService` +// in public interface'). The type is still private because the crate does +// not export it. pub struct ApiService { pub peer: std::net::SocketAddr, pub api_config: Arc,