pub struct OffsetAndTimestamp { /* private fields */ }Expand description
A container class for offset and timestamp.
Implementations§
Source§impl OffsetAndTimestamp
impl OffsetAndTimestamp
Sourcepub fn with_leader_epoch(
offset: i64,
timestamp: i64,
leader_epoch: Option<i32>,
) -> Result<Self, Error>
pub fn with_leader_epoch( offset: i64, timestamp: i64, leader_epoch: Option<i32>, ) -> Result<Self, Error>
Sourcepub fn leader_epoch(&self) -> Option<i32>
pub fn leader_epoch(&self) -> Option<i32>
Get the leader epoch corresponding to the offset that was found (if
one exists). This can be provided to seek() to ensure the log hasn’t
been truncated prior to fetching.
§Returns
The leader epoch or empty if it is not known
Trait Implementations§
Source§impl Clone for OffsetAndTimestamp
impl Clone for OffsetAndTimestamp
Source§fn clone(&self) -> OffsetAndTimestamp
fn clone(&self) -> OffsetAndTimestamp
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 Debug for OffsetAndTimestamp
impl Debug for OffsetAndTimestamp
Source§impl Display for OffsetAndTimestamp
impl Display for OffsetAndTimestamp
Source§impl Hash for OffsetAndTimestamp
impl Hash for OffsetAndTimestamp
Source§impl PartialEq for OffsetAndTimestamp
impl PartialEq for OffsetAndTimestamp
impl Eq for OffsetAndTimestamp
impl StructuralPartialEq for OffsetAndTimestamp
Auto Trait Implementations§
impl Freeze for OffsetAndTimestamp
impl RefUnwindSafe for OffsetAndTimestamp
impl Send for OffsetAndTimestamp
impl Sync for OffsetAndTimestamp
impl Unpin for OffsetAndTimestamp
impl UnsafeUnpin for OffsetAndTimestamp
impl UnwindSafe for OffsetAndTimestamp
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> 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.§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