pub struct Rules {
pub if_exists: IfExists,
pub atomic: bool,
pub temp_dir: Option<String>,
pub retries: u32,
pub connect_timeout: Duration,
pub timeout: Duration,
}Expand description
The rules for one delivery.
Fields§
§if_exists: IfExists§atomic: boolWrite under a temporary name, then rename.
temp_dir: Option<String>Where the temporary file goes: absolute, or relative to the final file’s folder. None:
next to the final file.
retries: u32How many times to try again after a temporary error (0: never).
connect_timeout: DurationFor the plugin’s client: how long to wait for a connection.
timeout: DurationFor the plugin’s client: how long a read or write may make no progress.
Implementations§
Source§impl Rules
impl Rules
Sourcepub fn legacy() -> Rules
pub fn legacy() -> Rules
How destinations delivered before these rules: replace, straight to the final name, no retries.
Sourcepub fn from_settings(
base: Rules,
connection: &Map<String, Value>,
options: &Map<String, Value>,
aliases: &[(&str, &str)],
) -> Result<(Rules, Vec<String>), String>
pub fn from_settings( base: Rules, connection: &Map<String, Value>, options: &Map<String, Value>, aliases: &[(&str, &str)], ) -> Result<(Rules, Vec<String>), String>
The rules from a profile target’s connection (connect_timeout, timeout,
retries) and a destination entry’s options (if_exists, atomic, temp_dir),
starting from base. aliases maps deprecated keys to these (("upload_timeout", "timeout")): an alias still works, with a warning. Returns the rules and the warnings.
Trait Implementations§
impl Eq for Rules
impl StructuralPartialEq for Rules
Auto Trait Implementations§
impl Freeze for Rules
impl RefUnwindSafe for Rules
impl Send for Rules
impl Sync for Rules
impl Unpin for Rules
impl UnsafeUnpin for Rules
impl UnwindSafe for Rules
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.