(summary: &ContainerSummary)
| 2866 | } |
| 2867 | |
| 2868 | fn summary_container_target(summary: &ContainerSummary) -> Option<String> { |
| 2869 | // Prefer the container ID: it's stable while the container exists and is |
| 2870 | // accepted by Docker APIs just like a name. Fall back to the parsed name |
| 2871 | // for transient summaries that do not include an ID. |
| 2872 | summary |
| 2873 | .id |
| 2874 | .as_deref() |
| 2875 | .filter(|id| !id.is_empty()) |
| 2876 | .map(str::to_string) |
| 2877 | .or_else(|| summary_container_name(summary)) |
| 2878 | } |
| 2879 | |
| 2880 | fn container_state_needs_shutdown_stop(state: ContainerSummaryStateEnum) -> bool { |
| 2881 | matches!( |
no test coverage detected