pub struct ImagesOutput {
pub output: CommandOutput,
pub images: Vec<ImageInfo>,
}
Expand description
Output from the images command with parsed image information
Fields§
§output: CommandOutput
Raw command output
images: Vec<ImageInfo>
Parsed image information (if output is parseable)
Implementations§
Source§impl ImagesOutput
impl ImagesOutput
Sourcepub fn success(&self) -> bool
pub fn success(&self) -> bool
Check if the command was successful
§Examples
let output = ImagesCommand::new().execute().await?;
if output.success() {
println!("Images listed successfully");
}
Sourcepub fn image_count(&self) -> usize
pub fn image_count(&self) -> usize
Get the number of images found
§Examples
let output = ImagesCommand::new().execute().await?;
println!("Found {} images", output.image_count());
Sourcepub fn image_ids(&self) -> Vec<&str>
pub fn image_ids(&self) -> Vec<&str>
Get image IDs only
§Examples
let output = ImagesCommand::new().execute().await?;
let ids = output.image_ids();
println!("Image IDs: {:?}", ids);
Trait Implementations§
Source§impl Clone for ImagesOutput
impl Clone for ImagesOutput
Source§fn clone(&self) -> ImagesOutput
fn clone(&self) -> ImagesOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ImagesOutput
impl RefUnwindSafe for ImagesOutput
impl Send for ImagesOutput
impl Sync for ImagesOutput
impl Unpin for ImagesOutput
impl UnwindSafe for ImagesOutput
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more