mirror of
https://github.com/sergi0g/cup.git
synced 2025-11-17 17:43:37 -05:00
27 lines
589 B
Rust
27 lines
589 B
Rust
use bollard::secret::{ImageInspect, ImageSummary};
|
|
|
|
pub trait InspectData {
|
|
fn tags(&self) -> Option<&Vec<String>>;
|
|
fn digests(&self) -> Option<&Vec<String>>;
|
|
}
|
|
|
|
impl InspectData for ImageInspect {
|
|
fn tags(&self) -> Option<&Vec<String>> {
|
|
self.repo_tags.as_ref()
|
|
}
|
|
|
|
fn digests(&self) -> Option<&Vec<String>> {
|
|
self.repo_digests.as_ref()
|
|
}
|
|
}
|
|
|
|
impl InspectData for ImageSummary {
|
|
fn tags(&self) -> Option<&Vec<String>> {
|
|
Some(&self.repo_tags)
|
|
}
|
|
|
|
fn digests(&self) -> Option<&Vec<String>> {
|
|
Some(&self.repo_digests)
|
|
}
|
|
}
|