#[non_exhaustive]pub enum OffsetSpec {
Earliest,
Latest,
MaxTimestamp,
EarliestLocal,
LatestTiered,
EarliestPendingUpload,
Timestamp(i64),
}Expand description
Specifies the desired offsets when using Admin::list_offsets.
Corresponds to org.apache.kafka.clients.admin.OffsetSpec. Java models the
variants as nested subclasses of OffsetSpec; the Rust translation uses a
single closed enum since the variants carry no behavior beyond their
timestamp mapping (getOffsetFromSpec).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Earliest
Retrieve the earliest offset of a partition.
Mirrors OffsetSpec.EarliestSpec.
Latest
Retrieve the latest offset of a partition.
Mirrors OffsetSpec.LatestSpec.
MaxTimestamp
Retrieve the offset with the largest timestamp of a partition.
Mirrors OffsetSpec.MaxTimestampSpec.
EarliestLocal
Retrieve the local log start offset.
Mirrors OffsetSpec.EarliestLocalSpec.
LatestTiered
Retrieve the highest offset of data stored in remote storage.
Mirrors OffsetSpec.LatestTieredSpec.
EarliestPendingUpload
Retrieve the earliest offset of records pending upload to remote storage.
Mirrors OffsetSpec.EarliestPendingUploadSpec.
Timestamp(i64)
Retrieve the earliest offset whose timestamp is greater than or equal to the given timestamp (in milliseconds).
Mirrors OffsetSpec.TimestampSpec.
Implementations§
Source§impl OffsetSpec
impl OffsetSpec
Sourcepub fn latest() -> Self
pub fn latest() -> Self
Used to retrieve the latest offset of a partition.
Mirrors OffsetSpec.latest().
Sourcepub fn earliest() -> Self
pub fn earliest() -> Self
Used to retrieve the earliest offset of a partition.
Mirrors OffsetSpec.earliest().
Sourcepub fn for_timestamp(timestamp: i64) -> Self
pub fn for_timestamp(timestamp: i64) -> Self
Used to retrieve the earliest offset whose timestamp is greater than or equal to the given timestamp (in milliseconds).
Mirrors OffsetSpec.forTimestamp(long).
Sourcepub fn max_timestamp() -> Self
pub fn max_timestamp() -> Self
Used to retrieve the offset with the largest timestamp of a partition.
Mirrors OffsetSpec.maxTimestamp().
Sourcepub fn earliest_local() -> Self
pub fn earliest_local() -> Self
Used to retrieve the local log start offset.
Mirrors OffsetSpec.earliestLocal().
Sourcepub fn latest_tiered() -> Self
pub fn latest_tiered() -> Self
Used to retrieve the highest offset of data stored in remote storage.
Mirrors OffsetSpec.latestTiered().
Sourcepub fn earliest_pending_upload() -> Self
pub fn earliest_pending_upload() -> Self
Used to retrieve the earliest offset of records pending upload to remote storage.
Mirrors OffsetSpec.earliestPendingUpload().
Trait Implementations§
Source§impl Clone for OffsetSpec
impl Clone for OffsetSpec
Source§fn clone(&self) -> OffsetSpec
fn clone(&self) -> OffsetSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OffsetSpec
impl Debug for OffsetSpec
Source§impl PartialEq for OffsetSpec
impl PartialEq for OffsetSpec
impl Copy for OffsetSpec
impl Eq for OffsetSpec
impl StructuralPartialEq for OffsetSpec
Auto Trait Implementations§
impl Freeze for OffsetSpec
impl RefUnwindSafe for OffsetSpec
impl Send for OffsetSpec
impl Sync for OffsetSpec
impl Unpin for OffsetSpec
impl UnsafeUnpin for OffsetSpec
impl UnwindSafe for OffsetSpec
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,
§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
§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
key and return true if they are equal.