pub struct FullKey<T: AsRef<[u8]>> {
pub user_key: UserKey<T>,
pub epoch_with_gap: EpochWithGap,
}
Expand description
Fields§
§user_key: UserKey<T>
§epoch_with_gap: EpochWithGap
Implementations§
Source§impl<T: AsRef<[u8]>> FullKey<T>
impl<T: AsRef<[u8]>> FullKey<T>
pub fn new( table_id: TableId, table_key: TableKey<T>, epoch: HummockEpoch, ) -> Self
pub fn new_with_gap_epoch( table_id: TableId, table_key: TableKey<T>, epoch_with_gap: EpochWithGap, ) -> Self
pub fn from_user_key(user_key: UserKey<T>, epoch: HummockEpoch) -> Self
Sourcepub fn for_test(table_id: TableId, table_key: T, epoch: HummockEpoch) -> Self
pub fn for_test(table_id: TableId, table_key: T, epoch: HummockEpoch) -> Self
Pass the inner type of table_key
to make the code less verbose.
Sourcepub fn encode_into(&self, buf: &mut impl BufMut)
pub fn encode_into(&self, buf: &mut impl BufMut)
Encode in to a buffer.
pub fn encode(&self) -> Vec<u8> ⓘ
pub fn encode_into_without_table_id(&self, buf: &mut impl BufMut)
pub fn encode_reverse_epoch(&self) -> Vec<u8> ⓘ
pub fn is_empty(&self) -> bool
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Get the length of the encoded format.
Source§impl<'a> FullKey<&'a [u8]>
impl<'a> FullKey<&'a [u8]>
Sourcepub fn from_slice_without_table_id(
table_id: TableId,
slice_without_table_id: &'a [u8],
) -> Self
pub fn from_slice_without_table_id( table_id: TableId, slice_without_table_id: &'a [u8], ) -> Self
Construct a FullKey
from a byte slice without table_id
encoded.
Sourcepub fn decode_reverse_epoch(slice: &'a [u8]) -> Self
pub fn decode_reverse_epoch(slice: &'a [u8]) -> Self
Construct a FullKey
from a byte slice.
pub fn to_vec(self) -> FullKey<Vec<u8>>
pub fn copy_into<T: CopyFromSlice + AsRef<[u8]>>(self) -> FullKey<T>
Trait Implementations§
Source§impl<T: AsRef<[u8]> + Ord + Eq> Ord for FullKey<T>
impl<T: AsRef<[u8]> + Ord + Eq> Ord for FullKey<T>
Source§impl<T: AsRef<[u8]> + Ord + Eq> PartialOrd for FullKey<T>
impl<T: AsRef<[u8]> + Ord + Eq> PartialOrd for FullKey<T>
impl<T: Copy + AsRef<[u8]>> Copy for FullKey<T>
impl<T: Eq + AsRef<[u8]>> Eq for FullKey<T>
impl<T: AsRef<[u8]>> StructuralPartialEq for FullKey<T>
Auto Trait Implementations§
impl<T> Freeze for FullKey<T>where
T: Freeze,
impl<T> RefUnwindSafe for FullKey<T>where
T: RefUnwindSafe,
impl<T> Send for FullKey<T>where
T: Send,
impl<T> Sync for FullKey<T>where
T: Sync,
impl<T> Unpin for FullKey<T>where
T: Unpin,
impl<T> UnwindSafe for FullKey<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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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>
§impl<M> MetricVecRelabelExt for M
impl<M> MetricVecRelabelExt for M
§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
].§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
].§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.§impl<T> SameOrElseExt for Twhere
T: Eq,
impl<T> SameOrElseExt for Twhere
T: Eq,
§fn same_or_else(self, other: T, f: impl FnOnce() -> T) -> T
fn same_or_else(self, other: T, f: impl FnOnce() -> T) -> T
Check if
self
and other
are equal, if so, return self
, otherwise return the result of f()
.