#[non_exhaustive]pub struct BatchingDescriptorProto {
pub batched_field: String,
pub discriminator_fields: Vec<String>,
pub subresponse_field: String,
/* private fields */
}Expand description
BatchingDescriptorProto specifies the fields of the request message to be
used for batching, and, optionally, the fields of the response message to be
used for demultiplexing.
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.batched_field: StringThe repeated field in the request message to be aggregated by batching.
discriminator_fields: Vec<String>A list of the fields in the request message. Two requests will be batched
together only if the values of every field specified in
request_discriminator_fields is equal between the two requests.
subresponse_field: StringOptional. When present, indicates the field in the response message to be used to demultiplex the response into multiple response messages, in correspondence with the multiple request messages originally batched together.
Implementations§
Source§impl BatchingDescriptorProto
impl BatchingDescriptorProto
pub fn new() -> Self
Sourcepub fn set_batched_field<T: Into<String>>(self, v: T) -> Self
pub fn set_batched_field<T: Into<String>>(self, v: T) -> Self
Sets the value of batched_field.
§Example
let x = BatchingDescriptorProto::new().set_batched_field("example");Sourcepub fn set_discriminator_fields<T, V>(self, v: T) -> Self
pub fn set_discriminator_fields<T, V>(self, v: T) -> Self
Sets the value of discriminator_fields.
§Example
let x = BatchingDescriptorProto::new().set_discriminator_fields(["a", "b", "c"]);Sourcepub fn set_subresponse_field<T: Into<String>>(self, v: T) -> Self
pub fn set_subresponse_field<T: Into<String>>(self, v: T) -> Self
Sets the value of subresponse_field.
§Example
let x = BatchingDescriptorProto::new().set_subresponse_field("example");Trait Implementations§
Source§impl Clone for BatchingDescriptorProto
impl Clone for BatchingDescriptorProto
Source§fn clone(&self) -> BatchingDescriptorProto
fn clone(&self) -> BatchingDescriptorProto
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more