pub enum LockWait {
Immediately,
Backoff {
budget: Duration,
},
Indefinitely,
}Expand description
Whether to wait for an existing lock, and for how long.
Variants§
Immediately
Fail immediately when the lock file already exists.
Backoff
Retry with jittered exponential backoff until budget elapses.
Indefinitely
Retry until the lock is acquired (Git core.filesRefLockTimeout = -1).
Implementations§
Source§impl LockWait
impl LockWait
Sourcepub fn files_ref_lock(config: Option<&ConfigSet>) -> Self
pub fn files_ref_lock(config: Option<&ConfigSet>) -> Self
core.filesRefLockTimeout (milliseconds), default 100 ms when unset.
Sourcepub fn parse_files_ref_lock_timeout_ms(config: Option<&ConfigSet>) -> i64
pub fn parse_files_ref_lock_timeout_ms(config: Option<&ConfigSet>) -> i64
Parse core.filesRefLockTimeout the way Git does (milliseconds).
Sourcepub fn packed_refs(config: Option<&ConfigSet>) -> Self
pub fn packed_refs(config: Option<&ConfigSet>) -> Self
core.packedRefsTimeout (milliseconds), default 1000 ms when unset.
Sourcepub fn reftable_tables_list(config: Option<&ConfigSet>) -> Self
pub fn reftable_tables_list(config: Option<&ConfigSet>) -> Self
reftable.lockTimeout (milliseconds), default 1000 ms when unset.
Sourcepub fn files_ref_lock_for_git_dir(git_dir: &Path) -> Self
pub fn files_ref_lock_for_git_dir(git_dir: &Path) -> Self
Load repository config from git_dir and return Self::files_ref_lock.
Sourcepub fn packed_refs_for_git_dir(git_dir: &Path) -> Self
pub fn packed_refs_for_git_dir(git_dir: &Path) -> Self
Load repository config from git_dir and return Self::packed_refs.
Trait Implementations§
impl Copy for LockWait
impl Eq for LockWait
impl StructuralPartialEq for LockWait
Auto Trait Implementations§
impl Freeze for LockWait
impl RefUnwindSafe for LockWait
impl Send for LockWait
impl Sync for LockWait
impl Unpin for LockWait
impl UnsafeUnpin for LockWait
impl UnwindSafe for LockWait
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
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§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
Compare self to
key and return true if they are equal.