#[non_exhaustive]pub struct Config {
pub keep_data_on_failed_write: bool,
pub error_propagation_on_no_retry: ErrorPropagation,
}Expand description
Tether configuration definition
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.keep_data_on_failed_write: boolDetermines the behavior in the event an error occurs when attempting to write data.
- true: The original data will be written once the connection is re-established
- false: The data will be cleared in the event of an error
Default: true
§Rationale
For some applications, the data written to an I/O object is time-sensitive, and it is preferable to drop data which cannot be delivered in short order, rather than send it with some unknown delay
error_propagation_on_no_retry: ErrorPropagationDetermines the response of the I/O object in the event the Resolver
elects not to reconnect. See ErrorPropagation for more details
Default: ErrorPropagation::IoOperations
Implementations§
Source§impl Config
impl Config
pub fn set_keep_data_on_failed_write(self, value: bool) -> Self
pub fn set_error_propagation_on_no_retry(self, value: ErrorPropagation) -> Self
Trait Implementations§
Source§impl Ord for Config
impl Ord for Config
Source§impl PartialOrd for Config
impl PartialOrd for Config
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
Mutably borrows from an owned value. Read more