pub struct TableChangeLogCommon<T>(VecDeque<EpochNewChangeLogCommon<T>>);Tuple Fields§
§0: VecDeque<EpochNewChangeLogCommon<T>>Implementations§
Source§impl<T> TableChangeLogCommon<T>
impl<T> TableChangeLogCommon<T>
pub fn new(logs: impl IntoIterator<Item = EpochNewChangeLogCommon<T>>) -> Self
pub fn iter(&self) -> impl Iterator<Item = &EpochNewChangeLogCommon<T>>
pub fn iter_mut( &mut self, ) -> impl Iterator<Item = &mut EpochNewChangeLogCommon<T>>
pub fn add_change_log(&mut self, new_change_log: EpochNewChangeLogCommon<T>)
pub fn epochs(&self) -> impl Iterator<Item = u64> + '_
pub(crate) fn change_log_into_iter( self, ) -> impl Iterator<Item = EpochNewChangeLogCommon<T>>
pub(crate) fn change_log_iter_mut( &mut self, ) -> impl Iterator<Item = &mut EpochNewChangeLogCommon<T>>
Source§impl<T> TableChangeLogCommon<T>
impl<T> TableChangeLogCommon<T>
pub fn filter_epoch( &self, (min_epoch, max_epoch): (u64, u64), ) -> impl Iterator<Item = &EpochNewChangeLogCommon<T>> + '_
Sourcepub fn next_epoch(&self, epoch: u64) -> Result<Option<u64>, ()>
pub fn next_epoch(&self, epoch: u64) -> Result<Option<u64>, ()>
Get the next_epoch of the given epoch
Return:
- Ok(Some(next_epoch)): the next_epoch of epoch
- Ok(None): next_epoch of epoch is not added to change log yet
- Err(()): epoch is not an existing or to exist one
Sourcepub fn get_non_empty_epochs(&self, min_epoch: u64, max_count: usize) -> Vec<u64>
pub fn get_non_empty_epochs(&self, min_epoch: u64, max_count: usize) -> Vec<u64>
Returns epochs where value is non-null and >= min_epoch.
pub fn truncate(&mut self, truncate_epoch: u64)
Source§impl<T> TableChangeLogCommon<T>
impl<T> TableChangeLogCommon<T>
pub fn to_protobuf(&self) -> PbTableChangeLog
Source§impl<T> TableChangeLogCommon<T>where
T: for<'a> From<&'a PbSstableInfo>,
impl<T> TableChangeLogCommon<T>where
T: for<'a> From<&'a PbSstableInfo>,
pub fn from_protobuf(val: &PbTableChangeLog) -> Self
Trait Implementations§
Source§impl<T: Clone> Clone for TableChangeLogCommon<T>
impl<T: Clone> Clone for TableChangeLogCommon<T>
Source§fn clone(&self) -> TableChangeLogCommon<T>
fn clone(&self) -> TableChangeLogCommon<T>
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<T: Debug> Debug for TableChangeLogCommon<T>
impl<T: Debug> Debug for TableChangeLogCommon<T>
Source§impl<T: PartialEq> PartialEq for TableChangeLogCommon<T>
impl<T: PartialEq> PartialEq for TableChangeLogCommon<T>
impl<T> StructuralPartialEq for TableChangeLogCommon<T>
Auto Trait Implementations§
impl<T> Freeze for TableChangeLogCommon<T>
impl<T> RefUnwindSafe for TableChangeLogCommon<T>where
T: RefUnwindSafe,
impl<T> Send for TableChangeLogCommon<T>where
T: Send,
impl<T> Sync for TableChangeLogCommon<T>where
T: Sync,
impl<T> Unpin for TableChangeLogCommon<T>where
T: Unpin,
impl<T> UnwindSafe for TableChangeLogCommon<T>where
T: UnwindSafe,
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,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§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>
Wrap the input message
T in a tonic::Request§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
Source§fn relabel(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level.Source§fn relabel_n(
self,
metric_level: MetricLevel,
relabel_threshold: MetricLevel,
relabel_num: usize,
) -> RelabeledMetricVec<M>
fn relabel_n( self, metric_level: MetricLevel, relabel_threshold: MetricLevel, relabel_num: usize, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n.Source§fn relabel_debug_1(
self,
relabel_threshold: MetricLevel,
) -> RelabeledMetricVec<M>
fn relabel_debug_1( self, relabel_threshold: MetricLevel, ) -> RelabeledMetricVec<M>
Equivalent to
RelabeledMetricVec::with_metric_level_relabel_n with metric_level set to
MetricLevel::Debug and relabel_num set to 1.