Struct kafka_protocol::messages::fetch_request::FetchRequestBuilder
source · [−]pub struct FetchRequestBuilder { /* private fields */ }
Expand description
Builder for FetchRequest
.
Implementations
sourceimpl FetchRequestBuilder
impl FetchRequestBuilder
sourcepub fn cluster_id(&mut self, value: Option<StrBytes>) -> &mut Self
pub fn cluster_id(&mut self, value: Option<StrBytes>) -> &mut Self
The clusterId if known. This is used to validate metadata fetches prior to broker registration.
Supported API versions: 12-13
sourcepub fn replica_id(&mut self, value: BrokerId) -> &mut Self
pub fn replica_id(&mut self, value: BrokerId) -> &mut Self
The broker ID of the follower, of -1 if this request is from a consumer.
Supported API versions: 0-13
sourcepub fn max_wait_ms(&mut self, value: i32) -> &mut Self
pub fn max_wait_ms(&mut self, value: i32) -> &mut Self
The maximum time in milliseconds to wait for the response.
Supported API versions: 0-13
sourcepub fn min_bytes(&mut self, value: i32) -> &mut Self
pub fn min_bytes(&mut self, value: i32) -> &mut Self
The minimum bytes to accumulate in the response.
Supported API versions: 0-13
sourcepub fn max_bytes(&mut self, value: i32) -> &mut Self
pub fn max_bytes(&mut self, value: i32) -> &mut Self
The maximum bytes to fetch. See KIP-74 for cases where this limit may not be honored.
Supported API versions: 3-13
sourcepub fn isolation_level(&mut self, value: i8) -> &mut Self
pub fn isolation_level(&mut self, value: i8) -> &mut Self
This setting controls the visibility of transactional records. Using READ_UNCOMMITTED (isolation_level = 0) makes all records visible. With READ_COMMITTED (isolation_level = 1), non-transactional and COMMITTED transactional records are visible. To be more concrete, READ_COMMITTED returns all data from offsets smaller than the current LSO (last stable offset), and enables the inclusion of the list of aborted transactions in the result, which allows consumers to discard ABORTED transactional records
Supported API versions: 4-13
sourcepub fn session_id(&mut self, value: i32) -> &mut Self
pub fn session_id(&mut self, value: i32) -> &mut Self
The fetch session ID.
Supported API versions: 7-13
sourcepub fn session_epoch(&mut self, value: i32) -> &mut Self
pub fn session_epoch(&mut self, value: i32) -> &mut Self
The fetch session epoch, which is used for ordering requests in a session.
Supported API versions: 7-13
sourcepub fn topics(&mut self, value: Vec<FetchTopic>) -> &mut Self
pub fn topics(&mut self, value: Vec<FetchTopic>) -> &mut Self
The topics to fetch.
Supported API versions: 0-13
sourcepub fn forgotten_topics_data(&mut self, value: Vec<ForgottenTopic>) -> &mut Self
pub fn forgotten_topics_data(&mut self, value: Vec<ForgottenTopic>) -> &mut Self
In an incremental fetch request, the partitions to remove.
Supported API versions: 7-13
sourcepub fn rack_id(&mut self, value: StrBytes) -> &mut Self
pub fn rack_id(&mut self, value: StrBytes) -> &mut Self
Rack ID of the consumer making this request
Supported API versions: 11-13
sourcepub fn unknown_tagged_fields(
&mut self,
value: BTreeMap<i32, Vec<u8>>
) -> &mut Self
pub fn unknown_tagged_fields(
&mut self,
value: BTreeMap<i32, Vec<u8>>
) -> &mut Self
Other tagged fields
sourcepub fn build(&self) -> Result<FetchRequest, FetchRequestBuilderError>
pub fn build(&self) -> Result<FetchRequest, FetchRequestBuilderError>
Trait Implementations
sourceimpl Clone for FetchRequestBuilder
impl Clone for FetchRequestBuilder
sourcefn clone(&self) -> FetchRequestBuilder
fn clone(&self) -> FetchRequestBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for FetchRequestBuilder
impl Send for FetchRequestBuilder
impl Sync for FetchRequestBuilder
impl Unpin for FetchRequestBuilder
impl UnwindSafe for FetchRequestBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more