pub struct ManifestAnnotateCommand {
pub executor: CommandExecutor,
/* private fields */
}Expand description
Docker manifest annotate command builder
Adds additional information to a local image manifest.
§Example
use docker_wrapper::{DockerCommand, ManifestAnnotateCommand};
let result = ManifestAnnotateCommand::new("myapp:latest", "myapp:latest-arm64")
.os("linux")
.arch("arm64")
.variant("v8")
.execute()
.await?;
println!("Annotated manifest: {}", result.manifest);Fields§
§executor: CommandExecutorCommand executor
Implementations§
Source§impl ManifestAnnotateCommand
impl ManifestAnnotateCommand
Sourcepub fn new(
manifest_list: impl Into<String>,
manifest: impl Into<String>,
) -> Self
pub fn new( manifest_list: impl Into<String>, manifest: impl Into<String>, ) -> Self
Create a new manifest annotate command
§Arguments
manifest_list- The manifest list name (e.g., “myapp:latest”)manifest- The manifest to annotate (e.g., “myapp:latest-arm64”)
Sourcepub fn arch(self, arch: impl Into<String>) -> Self
pub fn arch(self, arch: impl Into<String>) -> Self
Set the architecture (e.g., “amd64”, “arm64”, “arm”)
Sourcepub fn os(self, os: impl Into<String>) -> Self
pub fn os(self, os: impl Into<String>) -> Self
Set the operating system (e.g., “linux”, “windows”)
Sourcepub fn os_feature(self, feature: impl Into<String>) -> Self
pub fn os_feature(self, feature: impl Into<String>) -> Self
Add an operating system feature
Sourcepub fn os_version(self, version: impl Into<String>) -> Self
pub fn os_version(self, version: impl Into<String>) -> Self
Set the operating system version
Trait Implementations§
Source§impl Clone for ManifestAnnotateCommand
impl Clone for ManifestAnnotateCommand
Source§fn clone(&self) -> ManifestAnnotateCommand
fn clone(&self) -> ManifestAnnotateCommand
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 moreSource§impl Debug for ManifestAnnotateCommand
impl Debug for ManifestAnnotateCommand
Source§impl DockerCommand for ManifestAnnotateCommand
impl DockerCommand for ManifestAnnotateCommand
Source§type Output = ManifestAnnotateResult
type Output = ManifestAnnotateResult
The output type this command produces
Source§fn get_executor(&self) -> &CommandExecutor
fn get_executor(&self) -> &CommandExecutor
Get the command executor for extensibility
Source§fn get_executor_mut(&mut self) -> &mut CommandExecutor
fn get_executor_mut(&mut self) -> &mut CommandExecutor
Get mutable command executor for extensibility
Source§fn build_command_args(&self) -> Vec<String>
fn build_command_args(&self) -> Vec<String>
Build the complete command arguments including subcommands
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the command and return the typed output
Source§fn execute_command<'life0, 'async_trait>(
&'life0 self,
command_args: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn execute_command<'life0, 'async_trait>(
&'life0 self,
command_args: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Helper method to execute the command with proper error handling
Source§fn arg<S: AsRef<OsStr>>(&mut self, arg: S) -> &mut Self
fn arg<S: AsRef<OsStr>>(&mut self, arg: S) -> &mut Self
Add a raw argument to the command (escape hatch)
Source§fn args<I, S>(&mut self, args: I) -> &mut Self
fn args<I, S>(&mut self, args: I) -> &mut Self
Add multiple raw arguments to the command (escape hatch)
Source§fn option(&mut self, key: &str, value: &str) -> &mut Self
fn option(&mut self, key: &str, value: &str) -> &mut Self
Add a key-value option (e.g., –name value, –env key=value)
Source§fn with_timeout(&mut self, timeout: Duration) -> &mut Self
fn with_timeout(&mut self, timeout: Duration) -> &mut Self
Set a timeout for command execution Read more
Source§fn with_timeout_secs(&mut self, seconds: u64) -> &mut Self
fn with_timeout_secs(&mut self, seconds: u64) -> &mut Self
Set a timeout in seconds for command execution
Auto Trait Implementations§
impl Freeze for ManifestAnnotateCommand
impl RefUnwindSafe for ManifestAnnotateCommand
impl Send for ManifestAnnotateCommand
impl Sync for ManifestAnnotateCommand
impl Unpin for ManifestAnnotateCommand
impl UnwindSafe for ManifestAnnotateCommand
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