#[non_exhaustive]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: BTreeMap<i32, Bytes>,
}Expand description
Valid versions: 0-16
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.throttle_time_ms: i32The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota.
Supported API versions: 1-16
error_code: i16The top level response error code.
Supported API versions: 7-16
session_id: i32The fetch session ID, or 0 if this is not part of a fetch session.
Supported API versions: 7-16
responses: Vec<FetchableTopicResponse>The response topics.
Supported API versions: 0-16
node_endpoints: Vec<NodeEndpoint>Endpoints for all current-leaders enumerated in PartitionData, with errors NOT_LEADER_OR_FOLLOWER & FENCED_LEADER_EPOCH.
Supported API versions: 16
unknown_tagged_fields: BTreeMap<i32, Bytes>Other tagged fields
Implementations§
Source§impl FetchResponse
impl FetchResponse
Sourcepub fn with_throttle_time_ms(self, value: i32) -> Self
pub fn with_throttle_time_ms(self, value: i32) -> Self
Sets throttle_time_ms to the passed value.
The duration in milliseconds for which the request was throttled due to a quota violation, or zero if the request did not violate any quota.
Supported API versions: 1-16
Sourcepub fn with_error_code(self, value: i16) -> Self
pub fn with_error_code(self, value: i16) -> Self
Sets error_code to the passed value.
The top level response error code.
Supported API versions: 7-16
Sourcepub fn with_session_id(self, value: i32) -> Self
pub fn with_session_id(self, value: i32) -> Self
Sets session_id to the passed value.
The fetch session ID, or 0 if this is not part of a fetch session.
Supported API versions: 7-16
Sourcepub fn with_responses(self, value: Vec<FetchableTopicResponse>) -> Self
pub fn with_responses(self, value: Vec<FetchableTopicResponse>) -> Self
Sets responses to the passed value.
The response topics.
Supported API versions: 0-16
Sourcepub fn with_node_endpoints(self, value: Vec<NodeEndpoint>) -> Self
pub fn with_node_endpoints(self, value: Vec<NodeEndpoint>) -> Self
Sets node_endpoints to the passed value.
Endpoints for all current-leaders enumerated in PartitionData, with errors NOT_LEADER_OR_FOLLOWER & FENCED_LEADER_EPOCH.
Supported API versions: 16
Sourcepub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
pub fn with_unknown_tagged_fields(self, value: BTreeMap<i32, Bytes>) -> Self
Sets unknown_tagged_fields to the passed value.
Sourcepub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
pub fn with_unknown_tagged_field(self, key: i32, value: Bytes) -> Self
Inserts an entry into unknown_tagged_fields.
Trait Implementations§
Source§impl Clone for FetchResponse
impl Clone for FetchResponse
Source§fn clone(&self) -> FetchResponse
fn clone(&self) -> FetchResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FetchResponse
impl Debug for FetchResponse
Source§impl Decodable for FetchResponse
Available on crate feature client only.
impl Decodable for FetchResponse
client only.Source§impl Default for FetchResponse
impl Default for FetchResponse
Source§impl Encodable for FetchResponse
Available on crate feature broker only.
impl Encodable for FetchResponse
broker only.Source§impl From<FetchResponse> for ResponseKind
Available on crate feature messages_enums only.
impl From<FetchResponse> for ResponseKind
messages_enums only.