Skip to main content

SetParametersArgs

Struct SetParametersArgs 

Source
pub struct SetParametersArgs {
    pub epoch_min_duration: Option<String>,
    pub epoch_refresh_frequency: Option<String>,
    pub epoch_advance_on_count: Option<i64>,
    pub epoch_advance_on_size_mb: Option<i64>,
    pub epoch_checkpoint_frequency: Option<i64>,
    pub epoch_delete_parallelism: Option<i64>,
    pub retention_mode: Option<String>,
    pub retention_period: Option<String>,
}
Expand description

Flags for kopia repository set-parameters. Modeled on ThrottleArgs: an all-None builder whose caller skips the invocation entirely when nothing is set.

Durations are pre-rendered strings with a unit, not numbers — kopia’s time.ParseDuration rejects a bare number (--epoch-min-duration=3600time: missing unit in duration "3600"), so the caller must render them (kopiur_api::render_go_duration) rather than pass user text through.

Fields§

§epoch_min_duration: Option<String>

--epoch-min-duration (e.g. "6h").

§epoch_refresh_frequency: Option<String>

--epoch-refresh-frequency (e.g. "20m").

§epoch_advance_on_count: Option<i64>

--epoch-advance-on-count.

§epoch_advance_on_size_mb: Option<i64>

--epoch-advance-on-size-mb. MiB, despite the flag name — kopia multiplies by 1048576.

§epoch_checkpoint_frequency: Option<i64>

--epoch-checkpoint-frequency.

§epoch_delete_parallelism: Option<i64>

--epoch-delete-parallelism.

§retention_mode: Option<String>

--retention-mode. kopia declares this as an ENUM flag accepting exactly "none", "GOVERNANCE", or "COMPLIANCE" — note the lowercase none against the uppercase modes, which is kopia’s own inconsistency, not a typo here. Anything else is rejected by kopia’s flag parser before the command runs.

§retention_period: Option<String>

--retention-period (e.g. "720h"). Pre-rendered like the epoch durations. kopia’s own parser also accepts d, but kopiur never emits it — render_go_duration only produces h/m/s. Omitted when retention_mode is "none": kopia short-circuits the disable path before validating, so a period there is meaningless.

Implementations§

Source§

impl SetParametersArgs

Source

pub fn args(&self) -> Vec<String>

The flags for the set parameters, in a stable order. Empty when nothing is set (the caller then skips the set-parameters invocation).

Source

pub fn is_empty(&self) -> bool

Whether no parameters are set (so set-parameters is skipped).

Trait Implementations§

Source§

impl Clone for SetParametersArgs

Source§

fn clone(&self) -> SetParametersArgs

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 Debug for SetParametersArgs

Source§

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

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

impl Default for SetParametersArgs

Source§

fn default() -> SetParametersArgs

Returns the “default value” for a type. Read more
Source§

impl Eq for SetParametersArgs

Source§

impl PartialEq for SetParametersArgs

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for SetParametersArgs

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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