diff options
Diffstat (limited to 'src/sandbox/remote.rs')
| -rw-r--r-- | src/sandbox/remote.rs | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/sandbox/remote.rs b/src/sandbox/remote.rs index f881eb0..08474d4 100644 --- a/src/sandbox/remote.rs +++ b/src/sandbox/remote.rs @@ -9,14 +9,10 @@ use crate::error::{Error, Result}; use crate::sandbox::wire::{self, Frame}; use crate::sandbox::{Exit, Sandbox, SandboxBackend, SandboxInfo, SandboxSpec}; -/// The real definition. The module is private, so this `pub` -/// is not a nameable path from outside; the alias below is the -/// only way to reach it, and the alias is what carries the -/// feature-conditional visibility. +/// The real definition; the alias below carries the visibility. mod remote_backend { use super::{Config, Receiver}; - // `pub` fields inside a private module are not nameable from - // outside; they stay readable by the impls below. + // `pub` inside a private module is still unreadable from outside it. pub struct RemoteBackend { pub cfg: Config, @@ -26,11 +22,7 @@ mod remote_backend { } } -/// The remote backend, built by `backend_for`. A fixture test builds one to drive the agent protocol. -/// -/// `pub` only under `test-support`. Production reaches the type -/// through its own module and never names it from outside; the -/// outside reader that needs the name is a test. +/// The remote backend, built by `backend_for`. #[cfg(feature = "test-support")] pub use remote_backend::RemoteBackend; @@ -43,16 +35,8 @@ impl RemoteBackend { Ok(Self { cfg: cfg.clone(), token: token.to_string(), addr: bound.local, queue: bound.rx }) } - /// The address the rendezvous listener actually bound to. - /// - /// Test-tier only. Production binds through `bound_listener` and hands the - /// address to the agent itself, so nothing in the crate asks for it back; - /// `tests/remote_agent.rs` needs it to point a real agent at the socket. - /// It is gated rather than left public because the census believed it had - /// production callers at two `listener.local_addr()` calls — std's method - /// on a `TcpListener`, in sibling files, which a name match cannot tell - /// apart from this one. That confusion is what `dotted_only` confirmation - /// in `tools/test-surface.py` now forces a human to resolve. + /// The address the rendezvous listener actually bound to, so a test can + /// point a real agent at the socket. #[cfg(feature = "test-support")] pub fn local_addr(&self) -> &str { &self.addr |
