A human-readable URL for the forwarded port.
(&self)
| 586 | |
| 587 | /// A human-readable URL for the forwarded port. |
| 588 | pub fn access_url(&self) -> String { |
| 589 | let host = if self.bind_addr == "0.0.0.0" || self.bind_addr == "::" { |
| 590 | "localhost" |
| 591 | } else { |
| 592 | &self.bind_addr |
| 593 | }; |
| 594 | format!("http://{host}:{}/", self.port) |
| 595 | } |
| 596 | } |
| 597 | |
| 598 | impl std::fmt::Display for ForwardSpec { |
nothing calls this directly
no outgoing calls
no test coverage detected