From 5132db09f9c5133d0455c1218b32d172add6d682 Mon Sep 17 00:00:00 2001 From: Dominik Werder Date: Fri, 21 Mar 2025 14:43:35 +0100 Subject: [PATCH] Add monotonic check interface --- src/merge.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/merge.rs b/src/merge.rs index 2195246..a9e9e47 100644 --- a/src/merge.rs +++ b/src/merge.rs @@ -50,6 +50,7 @@ pub trait MergeableTy: fmt::Debug + WithLen + ByteEstimate + Unpin + Sized { fn tss_for_testing(&self) -> VecDeque; fn drain_into(&mut self, dst: &mut Self, range: Range) -> DrainIntoDstResult; fn drain_into_new(&mut self, range: Range) -> DrainIntoNewResult; + fn is_strict_monotonic(&self) -> bool; fn is_consistent(&self) -> bool; } @@ -63,5 +64,6 @@ pub trait MergeableDyn: fmt::Debug + WithLen + ByteEstimate + Unpin + AsAnyMut { fn drain_into(&mut self, dst: &mut dyn MergeableDyn, range: Range) -> DrainIntoDstResult; fn drain_into_new(&mut self, range: Range) -> DrainIntoNewDynResult; + fn is_strict_monotonic(&self) -> bool; fn is_consistent(&self) -> bool; }