1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
/** A default type for allocated fields in responses. */ pub(crate) type DefaultAllocatedField = String; /** Returned hits metadata. */ #[derive(Deserialize, Debug, Clone, Copy)] pub struct Shards { total: u32, successful: u32, failed: u32, } impl Shards { /** The total number of shards that participated in this request. */ pub fn total(&self) -> u32 { self.total } /** The total number of shards that successfully processed the request. */ pub fn successful(&self) -> u32 { self.successful } /** The total number of shards that failed to process the request. */ pub fn failed(&self) -> u32 { self.failed } }