Skip to main content

RsyncCapabilities

Struct RsyncCapabilities 

Source
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

Source

pub const MODERN: Self

Everything rch’s preferred argv needs (rsync >= 3.2).

Source

pub const LEGACY: Self

The openrsync / rsync 2.6.9 compatibility set.

Source

pub const fn is_compatibility_mode(&self) -> bool

Whether the compatibility argv (rather than the preferred one) is in use.

Source

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.

Source

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.

Source

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).

Source

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.

Source

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.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for RsyncCapabilities

Source§

impl Debug for RsyncCapabilities

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RsyncCapabilities

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for RsyncCapabilities

Source§

impl Hash for RsyncCapabilities

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for RsyncCapabilities

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for RsyncCapabilities

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for RsyncCapabilities

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more