pub struct RsyncCapabilities {
pub info_flags: bool,
pub stats_regular_file_breakdown: bool,
pub compress_choice: bool,
pub append_verify: bool,
pub no_motd: bool,
}Expand description
What a given rsync binary accepts. Every transfer builder asks this struct for its argv fragments instead of hard-coding rsync 3.x flags.
Fields§
§info_flags: bool--info=progress2 / --info=stats2 / --info=name2 (rsync >= 3.1).
stats_regular_file_breakdown: bool--stats prints Number of files: N (reg: R, dir: D) (rsync >= 3.1),
which the zero-build-output detector uses as its completeness
cross-check. Without it the detector fails open.
compress_choice: bool--compress-choice=zstd (rsync >= 3.2). Without it -z means zlib and
--compress-level is capped at 9.
append_verify: bool--append-verify (rsync >= 3.0). Without it resumable uploads rely on
--partial plus the delta algorithm alone.
no_motd: bool--no-motd (rsync >= 3.0, openrsync).
Implementations§
Source§impl RsyncCapabilities
impl RsyncCapabilities
Sourcepub const fn is_compatibility_mode(&self) -> bool
pub const fn is_compatibility_mode(&self) -> bool
Whether the compatibility argv (rather than the preferred one) is in use.
Sourcepub const fn progress_args(&self) -> &'static [&'static str]
pub const fn progress_args(&self) -> &'static [&'static str]
Progress reporting that refreshes often enough to feed the silence
stall detector. --info=progress2 prints one cumulative line refreshed
with bare \r; legacy --progress prints a per-file line in the same
<bytes> <pct>% <rate> <eta> (xfer#N, to-check=A/B) shape.
Sourcepub const fn stats_args(&self) -> &'static [&'static str]
pub const fn stats_args(&self) -> &'static [&'static str]
Transfer statistics block (Number of files transferred:, sent N bytes). Both spellings print the lines parse_rsync_bytes /
parse_rsync_files read.
Sourcepub const fn name_listing_args(&self) -> &'static [&'static str]
pub const fn name_listing_args(&self) -> &'static [&'static str]
Make rsync itemize EVERY matched regular file, including up-to-date
ones (.f lines), when combined with --out-format='%i %n'.
--info=name2 is the modern spelling; -vv is the pre-3.1 one and is
what openrsync honours (verified: -v alone lists only transferred
files, -vv also lists the .f matches).
Sourcepub fn compression_args(&self, level: u32) -> Vec<String>
pub fn compression_args(&self, level: u32) -> Vec<String>
Compression flags for a requested zstd level (0 disables).
Modern rsync gets --compress-choice=zstd --compress-level=N. A legacy
binary compresses with zlib via the -z every builder already passes,
so only --compress-level is emitted, clamped to zlib’s maximum of 9.
Sourcepub const fn resume_args(&self) -> &'static [&'static str]
pub const fn resume_args(&self) -> &'static [&'static str]
Resumable-upload flags for an immutable file: --partial always,
plus --append-verify where supported so a retry extends the remote
partial in place instead of re-deltaing it.
Sourcepub const fn no_motd_args(&self) -> &'static [&'static str]
pub const fn no_motd_args(&self) -> &'static [&'static str]
--no-motd where supported (suppresses daemon-mode banners that would
pollute parsed stdout); nothing otherwise.
Trait Implementations§
Source§impl Clone for RsyncCapabilities
impl Clone for RsyncCapabilities
impl Copy for RsyncCapabilities
Source§impl Debug for RsyncCapabilities
impl Debug for RsyncCapabilities
Source§impl<'de> Deserialize<'de> for RsyncCapabilities
impl<'de> Deserialize<'de> for RsyncCapabilities
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for RsyncCapabilities
Source§impl Hash for RsyncCapabilities
impl Hash for RsyncCapabilities
Source§impl PartialEq for RsyncCapabilities
impl PartialEq for RsyncCapabilities
Source§impl Serialize for RsyncCapabilities
impl Serialize for RsyncCapabilities
impl StructuralPartialEq for RsyncCapabilities
Auto Trait Implementations§
impl Freeze for RsyncCapabilities
impl RefUnwindSafe for RsyncCapabilities
impl Send for RsyncCapabilities
impl Sync for RsyncCapabilities
impl Unpin for RsyncCapabilities
impl UnsafeUnpin for RsyncCapabilities
impl UnwindSafe for RsyncCapabilities
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.