pub struct UpdateFeaturesResponse {
pub throttle_time_ms: i32,
pub error_code: i16,
pub error_message: Option<String>,
pub results: Vec<UpdatableFeatureResult>,
}Expand description
UpdateFeatures response (top-level error after throttle).
v2 omits per-feature Results.
Self::create_with_errors / Self::error are Java
UpdateFeaturesResponse.createWithErrors /
UpdateFeaturesRequest.getErrorResponse. ThrottleTimeMs is JSON
0+ (Self::throttle_time_ms; Self::new /
Self::create_with_errors / Self::error fill 0).
Fields§
§throttle_time_ms: i32UpdateFeatures ThrottleTimeMs (JSON 0+). First field. JSON
default is 0.
error_code: i16Kafka error code (0 is success).
error_message: Option<String>Broker error message, when present.
results: Vec<UpdatableFeatureResult>Per-item results.
Implementations§
Source§impl UpdateFeaturesResponse
impl UpdateFeaturesResponse
Sourcepub fn new(
error_code: i16,
error_message: Option<String>,
results: Vec<UpdatableFeatureResult>,
) -> Self
pub fn new( error_code: i16, error_message: Option<String>, results: Vec<UpdatableFeatureResult>, ) -> Self
Construct Self.
Sourcepub fn create_with_errors<I>(error_code: i16, updates: I) -> Self
pub fn create_with_errors<I>(error_code: i16, updates: I) -> Self
Java UpdateFeaturesResponse.createWithErrors.
Results are filled only when error_code is 0 (Java
ApiError.NONE): each name is copied onto an
UpdatableFeatureResult with that code. Otherwise Results stay
empty (Java UpdateFeaturesRequest.getErrorResponse passes
Collections.emptySet). Top-level ErrorMessage is the JSON
default (null); official Java also sets the English
Errors.message string. Throttle is the JSON default (0) from
Self::new; official Java also sets throttleTimeMs from the
argument. encode_update_features_response writes
resp.throttle_time_ms. v2 omits Results on the wire.
Sourcepub fn error(error_code: i16) -> Self
pub fn error(error_code: i16) -> Self
Java UpdateFeaturesRequest.getErrorResponse.
Self::create_with_errors with an empty feature-name set, so
Results stay empty even when error_code is 0.
Sourcepub fn throttle_time_ms(&self) -> i32
pub fn throttle_time_ms(&self) -> i32
UpdateFeatures ThrottleTimeMs (JSON 0+).
Sourcepub fn error_code(&self) -> i16
pub fn error_code(&self) -> i16
Kafka error code (0 is success).
Sourcepub fn error_message(&self) -> Option<&str>
pub fn error_message(&self) -> Option<&str>
Broker error message, when present.
Sourcepub fn top_level_error(&self) -> ApiError
pub fn top_level_error(&self) -> ApiError
Java UpdateFeaturesResponse.topLevelError.
Unknown codes become crate::error::UNKNOWN_SERVER_ERROR (Java
Errors.forCode).
Sourcepub fn results(&self) -> &[UpdatableFeatureResult]
pub fn results(&self) -> &[UpdatableFeatureResult]
Per-feature Results (empty on v2 decode; v2 omits them on the wire).
Sourcepub fn error_counts(&self) -> HashMap<i16, i32>
pub fn error_counts(&self) -> HashMap<i16, i32>
Java UpdateFeaturesResponse.errorCounts.
Counts the top-level errorCode (including NONE) plus each
per-feature code (including NONE). v2 decode leaves Results
empty.
Trait Implementations§
Source§impl Clone for UpdateFeaturesResponse
impl Clone for UpdateFeaturesResponse
Source§fn clone(&self) -> UpdateFeaturesResponse
fn clone(&self) -> UpdateFeaturesResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more