Skip to main content

SyncCommandExt

Trait SyncCommandExt 

Source
pub trait SyncCommandExt<This>{
    // Required methods
    fn transfer_command(
        &self,
        source: &This::Endpoint,
        destination: &This::Endpoint,
        mode: SyncMode,
    ) -> This::Command;
    fn command_rehearses(&self, command: &This::Command) -> bool;
    fn command_mirrors(&self, command: &This::Command) -> bool;
}
Expand description

Derives the command one folder transfer runs from the ends it joins.

Required Methods§

Source

fn transfer_command( &self, source: &This::Endpoint, destination: &This::Endpoint, mode: SyncMode, ) -> This::Command

States the command transferring one endpoint into another.

What is transferred may be one file or a whole folder, and each end is stated exactly as it was written. A source ending with a separator names the contents of a folder; one without names the path itself, which comes to rest inside the destination. Both are wanted, so neither is invented here.

Source

fn command_rehearses(&self, command: &This::Command) -> bool

Observes whether the command states what it would do instead of doing it.

Source

fn command_mirrors(&self, command: &This::Command) -> bool

Observes whether the command removes what the source no longer holds.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<This> SyncCommandExt<This> for This

Derives the command one folder transfer runs from the ends it joins.