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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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
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
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>
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.