pub struct DataRangeState { /* private fields */ }Expand description
State for data range manipulation (used by @warmup)
Allows annotations to extend the data range (e.g., for warmup periods) and then restore it after processing.
Implementations§
Source§impl DataRangeState
impl DataRangeState
pub fn new() -> Self
Sourcepub fn save_original(&mut self, start: usize, end: usize)
pub fn save_original(&mut self, start: usize, end: usize)
Record the original range before extending
Sourcepub fn set_extension(&mut self, amount: usize)
pub fn set_extension(&mut self, amount: usize)
Record how much the range was extended
Sourcepub fn original_start(&self) -> Option<usize>
pub fn original_start(&self) -> Option<usize>
Get the original start position
Sourcepub fn original_end(&self) -> Option<usize>
pub fn original_end(&self) -> Option<usize>
Get the original end position
Sourcepub fn extension_amount(&self) -> Option<usize>
pub fn extension_amount(&self) -> Option<usize>
Get the extension amount
Sourcepub fn is_extended(&self) -> bool
pub fn is_extended(&self) -> bool
Check if range is currently extended
Trait Implementations§
Source§impl Clone for DataRangeState
impl Clone for DataRangeState
Source§fn clone(&self) -> DataRangeState
fn clone(&self) -> DataRangeState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataRangeState
impl Debug for DataRangeState
Source§impl Default for DataRangeState
impl Default for DataRangeState
Source§fn default() -> DataRangeState
fn default() -> DataRangeState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DataRangeState
impl RefUnwindSafe for DataRangeState
impl Send for DataRangeState
impl Sync for DataRangeState
impl Unpin for DataRangeState
impl UnsafeUnpin for DataRangeState
impl UnwindSafe for DataRangeState
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<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