pub struct FollowPolicy {
pub interval: Duration,
}Expand description
How often a handle catches up with foreign writes on its own, before serving a read — the port
of the TS FollowPolicy (packages/hayson/src/table/table.ts).
It exists for a readonly handle, which never writes and so has no other occasion to notice what another process committed. A writable handle already sees its own writes and is the only writer the directory allows, so it follows nothing by default.
interval is a floor on how often the check is paid for, not a schedule: nothing runs in the
background, and a handle nobody reads from never looks at the disk at all. Duration::ZERO —
the default a readonly open resolves to, matching the TS DEFAULT_FOLLOW_INTERVAL_MS of 0 —
means every read checks, which costs one stat per log file when nothing changed.
Fields§
§interval: DurationTrait Implementations§
Source§impl Clone for FollowPolicy
impl Clone for FollowPolicy
impl Copy for FollowPolicy
Source§impl Debug for FollowPolicy
impl Debug for FollowPolicy
Source§impl Default for FollowPolicy
impl Default for FollowPolicy
impl Eq for FollowPolicy
Source§impl PartialEq for FollowPolicy
impl PartialEq for FollowPolicy
impl StructuralPartialEq for FollowPolicy
Auto Trait Implementations§
impl Freeze for FollowPolicy
impl RefUnwindSafe for FollowPolicy
impl Send for FollowPolicy
impl Sync for FollowPolicy
impl Unpin for FollowPolicy
impl UnsafeUnpin for FollowPolicy
impl UnwindSafe for FollowPolicy
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
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.