pub struct DescribeClusterRequest;Expand description
Java DescribeClusterRequest helpers.
Implementations§
Source§impl DescribeClusterRequest
impl DescribeClusterRequest
Sourcepub fn error_response(error_code: i16) -> ClusterDescription
pub fn error_response(error_code: i16) -> ClusterDescription
Java DescribeClusterRequest.getErrorResponse.
Sets the top-level ErrorCode. Official Java also calls
setErrorMessage from ApiError.fromThrowable (null when the
exception uses the generic Errors.message, or
UNKNOWN_SERVER_ERROR); this crate fills the JSON default
(null). Brokers stay empty. ClusterId stays the JSON default
(empty string). ControllerId stays -1. EndpointType stays
ENDPOINT_TYPE_BROKERS (JSON default 1; v0 omits it and
decode fills this). ClusterAuthorizedOperations stays
AUTHORIZED_OPERATIONS_OMITTED. Request
IncludeClusterAuthorizedOperations / EndpointType /
IncludeFencedBrokers are not copied. ThrottleTimeMs is JSON 0+
(JSON default 0; ClusterDescription::new fills 0).
Official Java getErrorResponse does not set
throttleTimeMs from the argument. This is not
DescribeClusterResponse::error_counts / UnregisterBroker
getErrorResponse / AllocateProducerIds getErrorResponse.