pub struct WatchLoopState { /* private fields */ }Expand description
Watch 主循环运行时状态(合并多个可变字段,减少参数列表长度)。
Implementations§
Source§impl WatchLoopState
impl WatchLoopState
Sourcepub fn new(
init_offsets: HashMap<PathBuf, u64>,
sqlite_db_url: Option<String>,
) -> Self
pub fn new( init_offsets: HashMap<PathBuf, u64>, sqlite_db_url: Option<String>, ) -> Self
构造 WatchLoopState,接受初始偏移映射与可选 SQLite 数据库 URL。
Sourcepub fn trigger_count(&self) -> u64
pub fn trigger_count(&self) -> u64
返回当前 trigger_count(全量 + 增量触发次数之和)。
Sourcepub fn total_stats(&self) -> &ErrorStats
pub fn total_stats(&self) -> &ErrorStats
返回总错误统计。
Sourcepub fn file_offsets(&self) -> &HashMap<PathBuf, u64>
pub fn file_offsets(&self) -> &HashMap<PathBuf, u64>
返回路径→字节偏移映射(用于集成测试验证 offset 持久化)。
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WatchLoopState
impl RefUnwindSafe for WatchLoopState
impl Send for WatchLoopState
impl Sync for WatchLoopState
impl Unpin for WatchLoopState
impl UnsafeUnpin for WatchLoopState
impl UnwindSafe for WatchLoopState
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more