]> git.proxmox.com Git - proxmox-backup.git/commitdiff
proxmox-rest-server: add comment why ApiService needs to be 'pub'
authorDietmar Maurer <dietmar@proxmox.com>
Fri, 1 Oct 2021 06:35:51 +0000 (08:35 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 1 Oct 2021 06:35:51 +0000 (08:35 +0200)
proxmox-rest-server/src/rest.rs

index 80ab0461f1ac9b9ff38fba865515c0dc3750ce43..d56edb1204e4d15aba9ec27679e0f9ff1419c703 100644 (file)
@@ -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<ApiConfig>,