pub struct LogoutCommand { /* private fields */ }
Expand description
Command for logging out from Docker registries
The LogoutCommand
provides a builder pattern for constructing Docker logout commands
to remove stored authentication credentials for Docker registries.
§Examples
use docker_wrapper::LogoutCommand;
// Logout from default registry (daemon-defined)
let logout = LogoutCommand::new();
// Logout from specific registry
let logout = LogoutCommand::new()
.server("my-registry.com");
Implementations§
Source§impl LogoutCommand
impl LogoutCommand
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new logout command
By default, logs out from the daemon-defined default registry
§Examples
use docker_wrapper::LogoutCommand;
let logout = LogoutCommand::new();
Sourcepub fn executor(self, executor: CommandExecutor) -> Self
pub fn executor(self, executor: CommandExecutor) -> Self
Sourcepub fn get_server(&self) -> Option<&str>
pub fn get_server(&self) -> Option<&str>
Gets the server (if set)
Trait Implementations§
Source§impl Clone for LogoutCommand
impl Clone for LogoutCommand
Source§fn clone(&self) -> LogoutCommand
fn clone(&self) -> LogoutCommand
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 LogoutCommand
impl Debug for LogoutCommand
Source§impl Default for LogoutCommand
impl Default for LogoutCommand
Source§impl Display for LogoutCommand
impl Display for LogoutCommand
Source§impl DockerCommand for LogoutCommand
impl DockerCommand for LogoutCommand
Source§type Output = LogoutOutput
type Output = LogoutOutput
The output type this command produces
Source§fn command_name(&self) -> &'static str
fn command_name(&self) -> &'static str
Get the command name (e.g., “run”, “exec”, “ps”)
Source§fn build_args(&self) -> Vec<String>
fn build_args(&self) -> Vec<String>
Build the command arguments
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 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)
Auto Trait Implementations§
impl Freeze for LogoutCommand
impl RefUnwindSafe for LogoutCommand
impl Send for LogoutCommand
impl Sync for LogoutCommand
impl Unpin for LogoutCommand
impl UnwindSafe for LogoutCommand
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