use bollard::secret::{ImageInspect, ImageSummary}; pub trait InspectData { fn tags(&self) -> Option<&Vec>; fn digests(&self) -> Option<&Vec>; } impl InspectData for ImageInspect { fn tags(&self) -> Option<&Vec> { self.repo_tags.as_ref() } fn digests(&self) -> Option<&Vec> { self.repo_digests.as_ref() } } impl InspectData for ImageSummary { fn tags(&self) -> Option<&Vec> { Some(&self.repo_tags) } fn digests(&self) -> Option<&Vec> { Some(&self.repo_digests) } }