pub struct ReconnectPolicy { /* private fields */ }Expand description
How long to keep trying to reopen a device that went away.
Implementations§
Source§impl ReconnectPolicy
impl ReconnectPolicy
Sourcepub const DEFAULT_TIMEOUT_SECS: u64 = 0
pub const DEFAULT_TIMEOUT_SECS: u64 = 0
Default reconnect window, in seconds. Off.
Waiting is opt-in because the wait BLOCKS the mount: a file manager that
walks the mount point would freeze for the whole window on a device
that’s really gone, and a stalled file manager is a worse default than
a mount that goes away. Users fighting a flaky cable turn it on with
--reconnect-timeout.
Sourcepub fn from_secs(secs: u64) -> Self
pub fn from_secs(secs: u64) -> Self
Builds a policy that gives the device secs seconds to come back.
Zero disables reconnection: the mount gives up on the first disconnect.
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Whether reconnection is turned off (--reconnect-timeout 0).
Trait Implementations§
Source§impl Clone for ReconnectPolicy
impl Clone for ReconnectPolicy
impl Copy for ReconnectPolicy
Source§impl Debug for ReconnectPolicy
impl Debug for ReconnectPolicy
Source§impl Default for ReconnectPolicy
impl Default for ReconnectPolicy
impl Eq for ReconnectPolicy
Source§impl PartialEq for ReconnectPolicy
impl PartialEq for ReconnectPolicy
impl StructuralPartialEq for ReconnectPolicy
Auto Trait Implementations§
impl Freeze for ReconnectPolicy
impl RefUnwindSafe for ReconnectPolicy
impl Send for ReconnectPolicy
impl Sync for ReconnectPolicy
impl Unpin for ReconnectPolicy
impl UnsafeUnpin for ReconnectPolicy
impl UnwindSafe for ReconnectPolicy
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