pub struct SearchCommand { /* private fields */ }
Expand description
Command for searching Docker Hub repositories
The SearchCommand
provides a builder pattern for constructing Docker search commands
with various filtering and limiting options.
§Examples
use docker_wrapper::SearchCommand;
// Basic search
let search = SearchCommand::new("redis");
// Search with filters and limits
let search = SearchCommand::new("nginx")
.limit(25)
.filter("stars=10")
.no_trunc();
Implementations§
Source§impl SearchCommand
impl SearchCommand
Sourcepub fn format_table(self) -> Self
pub fn format_table(self) -> Self
Sets output format to table (default)
Sourcepub fn format_json(self) -> Self
pub fn format_json(self) -> Self
Sets output format to JSON
Sourcepub fn no_trunc(self) -> Self
pub fn no_trunc(self) -> Self
Disables truncation of output
§Examples
use docker_wrapper::SearchCommand;
let search = SearchCommand::new("mysql").no_trunc();
Sourcepub fn executor(self, executor: CommandExecutor) -> Self
pub fn executor(self, executor: CommandExecutor) -> Self
Sourcepub fn get_filters(&self) -> &[String]
pub fn get_filters(&self) -> &[String]
Gets the filters
Sourcepub fn get_format(&self) -> Option<&str>
pub fn get_format(&self) -> Option<&str>
Gets the output format (if set)
Sourcepub fn is_no_trunc(&self) -> bool
pub fn is_no_trunc(&self) -> bool
Returns true if output truncation is disabled
Trait Implementations§
Source§impl Clone for SearchCommand
impl Clone for SearchCommand
Source§fn clone(&self) -> SearchCommand
fn clone(&self) -> SearchCommand
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 SearchCommand
impl Debug for SearchCommand
Source§impl Default for SearchCommand
impl Default for SearchCommand
Source§impl Display for SearchCommand
impl Display for SearchCommand
Source§impl DockerCommand for SearchCommand
impl DockerCommand for SearchCommand
Source§type Output = SearchOutput
type Output = SearchOutput
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 SearchCommand
impl RefUnwindSafe for SearchCommand
impl Send for SearchCommand
impl Sync for SearchCommand
impl Unpin for SearchCommand
impl UnwindSafe for SearchCommand
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