pub struct IncrementalAlterConfigsResponse;Expand description
Java IncrementalAlterConfigsResponse helpers.
Self::from_errors is Java IncrementalAlterConfigsResponse
constructed from a result map.
Implementations§
Source§impl IncrementalAlterConfigsResponse
impl IncrementalAlterConfigsResponse
Sourcepub fn from_response_data(
results: &[AlterConfigsResourceResult],
) -> HashMap<ConfigResource, ApiError>
pub fn from_response_data( results: &[AlterConfigsResourceResult], ) -> HashMap<ConfigResource, ApiError>
Java IncrementalAlterConfigsResponse.fromResponseData.
Same map as crate::protocol::admin::AlterConfigsResponse::errors.
Source§impl IncrementalAlterConfigsResponse
impl IncrementalAlterConfigsResponse
Sourcepub const fn should_client_throttle(version: i16) -> bool
pub const fn should_client_throttle(version: i16) -> bool
Java IncrementalAlterConfigsResponse.shouldClientThrottle.
Sourcepub fn error_counts(results: &[AlterConfigsResourceResult]) -> HashMap<i16, i32>
pub fn error_counts(results: &[AlterConfigsResourceResult]) -> HashMap<i16, i32>
Java IncrementalAlterConfigsResponse.errorCounts.
Counts per-resource error codes (including NONE).
Sourcepub fn from_errors<'a, I>(results: I) -> Vec<AlterConfigsResourceResult>
pub fn from_errors<'a, I>(results: I) -> Vec<AlterConfigsResourceResult>
Java IncrementalAlterConfigsResponse constructor from a result map.
Each item is one ConfigResource (type id + name) plus
ApiError. Order is iterator order (Java HashMap.forEach order
is unspecified). Duplicate type/name pairs are kept
(ArrayList.add). ErrorCode / ErrorMessage come from
ApiError::error / ApiError::message (the message is
copied; contrast AlterConfigsResourceResult::error, which
leaves ErrorMessage null). Inverse of Self::from_response_data.
Throttle is the JSON default (0).
Self::encode_from_errors writes the Java requestThrottleMs
argument.
Sourcepub fn encode_from_errors<'a, I>(
buf: &mut BytesMut,
version: i16,
results: I,
throttle_time_ms: i32,
) -> Result<()>
pub fn encode_from_errors<'a, I>( buf: &mut BytesMut, version: i16, results: I, throttle_time_ms: i32, ) -> Result<()>
Java IncrementalAlterConfigsResponse(int, Map) encode.
Responses are Self::from_errors. ThrottleTimeMs is written
from throttle_time_ms on every spoken version (JSON 0+).
Convenience encode_incremental_alter_configs_resource_results
still writes throttle 0. Distinct from
IncrementalAlterConfigsRequest::error_response (null
ErrorMessage; Java does not set throttle). This crate speaks 0–1.
This is not Self::from_errors / Request getErrorResponse /
IncrementalAlterConfigsRequest::from_configs.