pub struct GapDetector {
pub expected_interval_ns: i64,
pub tolerance: f64,
}Expand description
Detects gaps in a sorted timestamp column where the interval exceeds
expected_interval × tolerance.
Fields§
§expected_interval_ns: i64Expected interval between consecutive timestamps (nanoseconds).
tolerance: f64Tolerance multiplier — gap is detected when interval > expected × tolerance.
Implementations§
Source§impl GapDetector
impl GapDetector
Sourcepub fn new(expected_interval_ns: i64, tolerance: f64) -> Option<Self>
pub fn new(expected_interval_ns: i64, tolerance: f64) -> Option<Self>
Creates a new gap detector.
§Arguments
expected_interval_ns— expected interval between consecutive points (nanoseconds, must be > 0)tolerance— multiplier for gap threshold (e.g. 1.5 means gap if interval > 1.5× expected, must be > 0)
§Errors
Returns None if expected_interval_ns <= 0 or tolerance <= 0.0.
Auto Trait Implementations§
impl Freeze for GapDetector
impl RefUnwindSafe for GapDetector
impl Send for GapDetector
impl Sync for GapDetector
impl Unpin for GapDetector
impl UnsafeUnpin for GapDetector
impl UnwindSafe for GapDetector
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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