pub struct ComposeCpCommand {
pub config: ComposeConfig,
pub source: String,
pub destination: String,
pub archive: bool,
pub follow_link: bool,
pub index: Option<u32>,
}
Expand description
Docker Compose cp command
Copy files/folders between a service container and the local filesystem.
Fields§
§config: ComposeConfig
Base configuration
source: String
Source path (can be container:path or local path)
destination: String
Destination path (can be container:path or local path)
archive: bool
Archive mode (preserve permissions)
follow_link: bool
Follow symbolic links
index: Option<u32>
Index of the container (if service has multiple instances)
Implementations§
Source§impl ComposeCpCommand
impl ComposeCpCommand
Sourcepub fn new(source: impl Into<String>, destination: impl Into<String>) -> Self
pub fn new(source: impl Into<String>, destination: impl Into<String>) -> Self
Create a new cp command
Sourcepub fn from_container(
service: impl Into<String>,
container_path: impl Into<String>,
local_path: impl Into<PathBuf>,
) -> Self
pub fn from_container( service: impl Into<String>, container_path: impl Into<String>, local_path: impl Into<PathBuf>, ) -> Self
Copy from container to local
Sourcepub fn to_container(
local_path: impl Into<PathBuf>,
service: impl Into<String>,
container_path: impl Into<String>,
) -> Self
pub fn to_container( local_path: impl Into<PathBuf>, service: impl Into<String>, container_path: impl Into<String>, ) -> Self
Copy from local to container
Sourcepub fn project_name(self, name: impl Into<String>) -> Self
pub fn project_name(self, name: impl Into<String>) -> Self
Set project name
Sourcepub fn follow_link(self) -> Self
pub fn follow_link(self) -> Self
Follow symbolic links
Trait Implementations§
Source§impl Clone for ComposeCpCommand
impl Clone for ComposeCpCommand
Source§fn clone(&self) -> ComposeCpCommand
fn clone(&self) -> ComposeCpCommand
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 ComposeCommandV2 for ComposeCpCommand
impl ComposeCommandV2 for ComposeCpCommand
Source§fn get_config(&self) -> &ComposeConfig
fn get_config(&self) -> &ComposeConfig
Get the compose configuration
Source§fn get_config_mut(&mut self) -> &mut ComposeConfig
fn get_config_mut(&mut self) -> &mut ComposeConfig
Get mutable compose configuration
Source§fn execute_compose<'life0, 'async_trait>(
&'life0 self,
args: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute_compose<'life0, 'async_trait>(
&'life0 self,
args: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute compose command with given arguments
Auto Trait Implementations§
impl Freeze for ComposeCpCommand
impl RefUnwindSafe for ComposeCpCommand
impl Send for ComposeCpCommand
impl Sync for ComposeCpCommand
impl Unpin for ComposeCpCommand
impl UnwindSafe for ComposeCpCommand
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