#[non_exhaustive]pub struct BatchingSettingsProto {
pub element_count_threshold: i32,
pub request_byte_threshold: i64,
pub delay_threshold: Option<Duration>,
pub element_count_limit: i32,
pub request_byte_limit: i32,
pub flow_control_element_limit: i32,
pub flow_control_byte_limit: i32,
pub flow_control_limit_exceeded_behavior: FlowControlLimitExceededBehaviorProto,
/* private fields */
}Expand description
BatchingSettingsProto specifies a set of batching thresholds, each of
which acts as a trigger to send a batch of messages as a request. At least
one threshold must be positive nonzero.
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.element_count_threshold: i32The number of elements of a field collected into a batch which, if exceeded, causes the batch to be sent.
request_byte_threshold: i64The aggregated size of the batched field which, if exceeded, causes the batch to be sent. This size is computed by aggregating the sizes of the request field to be batched, not of the entire request message.
delay_threshold: Option<Duration>The duration after which a batch should be sent, starting from the addition of the first message to that batch.
element_count_limit: i32The maximum number of elements collected in a batch that could be accepted by server.
request_byte_limit: i32The maximum size of the request that could be accepted by server.
flow_control_element_limit: i32The maximum number of elements allowed by flow control.
flow_control_byte_limit: i32The maximum size of data allowed by flow control.
flow_control_limit_exceeded_behavior: FlowControlLimitExceededBehaviorProtoThe behavior to take when the flow control limit is exceeded.
Implementations§
Source§impl BatchingSettingsProto
impl BatchingSettingsProto
pub fn new() -> Self
Sourcepub fn set_element_count_threshold<T: Into<i32>>(self, v: T) -> Self
pub fn set_element_count_threshold<T: Into<i32>>(self, v: T) -> Self
Sets the value of element_count_threshold.
§Example
let x = BatchingSettingsProto::new().set_element_count_threshold(42);Sourcepub fn set_request_byte_threshold<T: Into<i64>>(self, v: T) -> Self
pub fn set_request_byte_threshold<T: Into<i64>>(self, v: T) -> Self
Sets the value of request_byte_threshold.
§Example
let x = BatchingSettingsProto::new().set_request_byte_threshold(42);Sourcepub fn set_delay_threshold<T>(self, v: T) -> Self
pub fn set_delay_threshold<T>(self, v: T) -> Self
Sets the value of delay_threshold.
§Example
use wkt::Duration;
let x = BatchingSettingsProto::new().set_delay_threshold(Duration::default()/* use setters */);Sourcepub fn set_or_clear_delay_threshold<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_delay_threshold<T>(self, v: Option<T>) -> Self
Sets or clears the value of delay_threshold.
§Example
use wkt::Duration;
let x = BatchingSettingsProto::new().set_or_clear_delay_threshold(Some(Duration::default()/* use setters */));
let x = BatchingSettingsProto::new().set_or_clear_delay_threshold(None::<Duration>);Sourcepub fn set_element_count_limit<T: Into<i32>>(self, v: T) -> Self
pub fn set_element_count_limit<T: Into<i32>>(self, v: T) -> Self
Sets the value of element_count_limit.
§Example
let x = BatchingSettingsProto::new().set_element_count_limit(42);Sourcepub fn set_request_byte_limit<T: Into<i32>>(self, v: T) -> Self
pub fn set_request_byte_limit<T: Into<i32>>(self, v: T) -> Self
Sets the value of request_byte_limit.
§Example
let x = BatchingSettingsProto::new().set_request_byte_limit(42);Sourcepub fn set_flow_control_element_limit<T: Into<i32>>(self, v: T) -> Self
pub fn set_flow_control_element_limit<T: Into<i32>>(self, v: T) -> Self
Sets the value of flow_control_element_limit.
§Example
let x = BatchingSettingsProto::new().set_flow_control_element_limit(42);Sourcepub fn set_flow_control_byte_limit<T: Into<i32>>(self, v: T) -> Self
pub fn set_flow_control_byte_limit<T: Into<i32>>(self, v: T) -> Self
Sets the value of flow_control_byte_limit.
§Example
let x = BatchingSettingsProto::new().set_flow_control_byte_limit(42);Sourcepub fn set_flow_control_limit_exceeded_behavior<T: Into<FlowControlLimitExceededBehaviorProto>>(
self,
v: T,
) -> Self
pub fn set_flow_control_limit_exceeded_behavior<T: Into<FlowControlLimitExceededBehaviorProto>>( self, v: T, ) -> Self
Sets the value of flow_control_limit_exceeded_behavior.
§Example
use google_cloud_api::model::FlowControlLimitExceededBehaviorProto;
let x0 = BatchingSettingsProto::new().set_flow_control_limit_exceeded_behavior(FlowControlLimitExceededBehaviorProto::ThrowException);
let x1 = BatchingSettingsProto::new().set_flow_control_limit_exceeded_behavior(FlowControlLimitExceededBehaviorProto::Block);
let x2 = BatchingSettingsProto::new().set_flow_control_limit_exceeded_behavior(FlowControlLimitExceededBehaviorProto::Ignore);Trait Implementations§
Source§impl Clone for BatchingSettingsProto
impl Clone for BatchingSettingsProto
Source§fn clone(&self) -> BatchingSettingsProto
fn clone(&self) -> BatchingSettingsProto
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more