(result: service::ServiceInstallResult)
| 2015 | |
| 2016 | impl PairingTarget { |
| 2017 | fn from_service(result: service::ServiceInstallResult) -> anyhow::Result<Self> { |
| 2018 | Ok(Self { |
| 2019 | target: "service", |
| 2020 | service: Some(result.service), |
| 2021 | project_root: None, |
| 2022 | pid: None, |
| 2023 | http_url: http_url_for_host("127.0.0.1", result.port), |
| 2024 | port: result.port, |
| 2025 | advertise_host: result.advertise_host, |
| 2026 | server_id: result |
| 2027 | .access_token |
| 2028 | .as_deref() |
| 2029 | .map(auth::server_identity_for_token), |
| 2030 | pairing_code: result |
| 2031 | .pairing_code |
| 2032 | .context("SimDeck service did not publish a pairing code")?, |
| 2033 | }) |
| 2034 | } |
| 2035 | } |
| 2036 | |
| 2037 | fn print_pairing_result(target: &PairingTarget, started: bool, json: bool) -> anyhow::Result<()> { |
nothing calls this directly
no test coverage detected