pub struct FetchMetadata { /* private fields */ }Expand description
Java FetchMetadata (incremental fetch session id and epoch).
encode_fetch_request writes Self::LEGACY (session_id 0 /
epoch -1): close any session and do not create one.
encode_fetch_request_with_session writes this value on v7+. Below
v7 SessionId / SessionEpoch are omitted even when this is not
LEGACY; decode fills Self::LEGACY. std::fmt::Display is Java toString
((sessionId=INVALID, epoch=FINAL)).
Implementations§
Source§impl FetchMetadata
impl FetchMetadata
Sourcepub const INVALID_SESSION_ID: i32 = 0
pub const INVALID_SESSION_ID: i32 = 0
Java FetchMetadata.INVALID_SESSION_ID.
Sourcepub const INITIAL_EPOCH: i32 = 0
pub const INITIAL_EPOCH: i32 = 0
Java FetchMetadata.INITIAL_EPOCH.
Sourcepub const FINAL_EPOCH: i32 = -1
pub const FINAL_EPOCH: i32 = -1
Java FetchMetadata.FINAL_EPOCH.
Sourcepub const fn session_id(self) -> i32
pub const fn session_id(self) -> i32
Java FetchMetadata.sessionId.
Sourcepub const fn next_epoch(prev_epoch: i32) -> i32
pub const fn next_epoch(prev_epoch: i32) -> i32
Java FetchMetadata.nextEpoch.
Sourcepub const fn next_close_existing(self) -> Self
pub const fn next_close_existing(self) -> Self
Java FetchMetadata.nextCloseExisting.
Sourcepub const fn next_close_existing_attempt_new(self) -> Self
pub const fn next_close_existing_attempt_new(self) -> Self
Java FetchMetadata.nextCloseExistingAttemptNew.
Sourcepub const fn new_incremental(session_id: i32) -> Self
pub const fn new_incremental(session_id: i32) -> Self
Java FetchMetadata.newIncremental.
Sourcepub const fn next_incremental(self) -> Self
pub const fn next_incremental(self) -> Self
Java FetchMetadata.nextIncremental.
Trait Implementations§
Source§impl Clone for FetchMetadata
impl Clone for FetchMetadata
Source§fn clone(&self) -> FetchMetadata
fn clone(&self) -> FetchMetadata
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FetchMetadata
Source§impl Debug for FetchMetadata
impl Debug for FetchMetadata
Source§impl Display for FetchMetadata
impl Display for FetchMetadata
impl Eq for FetchMetadata
Source§impl Hash for FetchMetadata
impl Hash for FetchMetadata
Source§impl PartialEq for FetchMetadata
impl PartialEq for FetchMetadata
impl StructuralPartialEq for FetchMetadata
Auto Trait Implementations§
impl Freeze for FetchMetadata
impl RefUnwindSafe for FetchMetadata
impl Send for FetchMetadata
impl Sync for FetchMetadata
impl Unpin for FetchMetadata
impl UnsafeUnpin for FetchMetadata
impl UnwindSafe for FetchMetadata
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