pub struct BooleanToRanges { /* private fields */ }Expand description
Converts a boolean series to a range series, where each contiguous run of true values becomes a half-open range [start, end). The boolean series is treated as forward-filled: a value holds until the next sample. For example, given timestamps [0, 1, 2, 3, 4] and values [true, true, true, false, false], the result is a single range [0, 3). When openEnded is false and the series ends with true, the last range is closed at the final timestamp, producing a zero-duration range (moment) for isolated true values.
Implementations§
Source§impl BooleanToRanges
impl BooleanToRanges
Sourcepub fn builder() -> Builder<InputStage>
pub fn builder() -> Builder<InputStage>
Returns a new builder.
Source§impl BooleanToRanges
impl BooleanToRanges
Sourcepub fn new(input: BooleanSeries) -> Self
pub fn new(input: BooleanSeries) -> Self
Constructs a new instance of the type.
pub fn input(&self) -> &BooleanSeries
Sourcepub fn open_ended(&self) -> Option<bool>
pub fn open_ended(&self) -> Option<bool>
If true, the last range will be open-ended if the last value is true. Defaults to true. Set to false to close trailing ranges at the last timestamp, which produces zero-duration ranges (moments) for isolated trailing true values.
Trait Implementations§
Source§impl Clone for BooleanToRanges
impl Clone for BooleanToRanges
Source§fn clone(&self) -> BooleanToRanges
fn clone(&self) -> BooleanToRanges
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BooleanToRanges
impl Debug for BooleanToRanges
Source§impl<'de> Deserialize<'de> for BooleanToRanges
impl<'de> Deserialize<'de> for BooleanToRanges
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<BooleanToRanges> for Builder<Complete>
impl From<BooleanToRanges> for Builder<Complete>
Source§fn from(v: BooleanToRanges) -> Self
fn from(v: BooleanToRanges) -> Self
Source§impl Hash for BooleanToRanges
impl Hash for BooleanToRanges
Source§impl Ord for BooleanToRanges
impl Ord for BooleanToRanges
Source§impl PartialEq for BooleanToRanges
impl PartialEq for BooleanToRanges
Source§impl PartialOrd for BooleanToRanges
impl PartialOrd for BooleanToRanges
Source§impl Serialize for BooleanToRanges
impl Serialize for BooleanToRanges
impl Eq for BooleanToRanges
Auto Trait Implementations§
impl Freeze for BooleanToRanges
impl RefUnwindSafe for BooleanToRanges
impl Send for BooleanToRanges
impl Sync for BooleanToRanges
impl Unpin for BooleanToRanges
impl UnsafeUnpin for BooleanToRanges
impl UnwindSafe for BooleanToRanges
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request