pub struct FetchResponse {
pub throttle_time_ms: i32,
pub error_code: i16,
pub session_id: i32,
pub responses: Vec<FetchableTopicResponse>,
pub node_endpoints: Vec<NodeEndpoint>,
pub unknown_tagged_fields: UnknownTaggedFields,
}Fields§
§throttle_time_ms: i32§error_code: i16§session_id: i32§responses: Vec<FetchableTopicResponse>§node_endpoints: Vec<NodeEndpoint>§unknown_tagged_fields: UnknownTaggedFieldsImplementations§
Source§impl FetchResponse
impl FetchResponse
Sourcepub fn write_plan(
&self,
version: i16,
) -> Result<Vec<FetchWriteOp>, ProtocolError>
pub fn write_plan( &self, version: i16, ) -> Result<Vec<FetchWriteOp>, ProtocolError>
Serialize this response as an ordered FetchWriteOp plan whose
concatenated bytes are byte-identical to [FetchResponse::encode]
at the same version.
Only valid for the canonical (v4+) Fetch codec — the legacy
kafka_3_6_2 path (v0–v3) does not get a plan (it down-converts and
stays on the copy path). The caller must gate on version >= 4.
The records length prefix is written into the inline segment that
precedes each Records op, so resolving Records to its bytes and
concatenating reproduces the exact wire frame.
Trait Implementations§
Source§impl Clone for FetchResponse
impl Clone for FetchResponse
Source§fn clone(&self) -> FetchResponse
fn clone(&self) -> FetchResponse
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 moreSource§impl Debug for FetchResponse
impl Debug for FetchResponse
Source§impl Decode<'_> for FetchResponse
impl Decode<'_> for FetchResponse
Source§impl Default for FetchResponse
impl Default for FetchResponse
Source§fn default() -> FetchResponse
fn default() -> FetchResponse
Returns the “default value” for a type. Read more
Source§impl Encode for FetchResponse
impl Encode for FetchResponse
impl Eq for FetchResponse
Source§impl From<FetchResponse> for FetchResponse
impl From<FetchResponse> for FetchResponse
Source§fn from(c: FetchResponse) -> Self
fn from(c: FetchResponse) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FetchResponse
impl PartialEq for FetchResponse
Source§fn eq(&self, other: &FetchResponse) -> bool
fn eq(&self, other: &FetchResponse) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for FetchResponse
Auto Trait Implementations§
impl Freeze for FetchResponse
impl RefUnwindSafe for FetchResponse
impl Send for FetchResponse
impl Sync for FetchResponse
impl Unpin for FetchResponse
impl UnsafeUnpin for FetchResponse
impl UnwindSafe for FetchResponse
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