#[non_exhaustive]pub struct Response {
pub aggregations: Option<IndexMap<String, AggregationContainer>>,
pub size: Option<i64>,
pub source: Option<SourceConfig>,
pub fields: Option<Vec<FieldAndFormat>>,
pub query: Option<QueryContainer>,
pub sort: Option<Sort>,
pub track_total_hits: Option<TrackHits>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.aggregations: Option<IndexMap<String, AggregationContainer>>§size: Option<i64>§source: Option<SourceConfig>§fields: Option<Vec<FieldAndFormat>>§query: Option<QueryContainer>§sort: Option<Sort>§track_total_hits: Option<TrackHits>Implementations§
Source§impl Response
impl Response
Sourcepub fn aggregations(
self,
value: impl Into<IndexMap<String, AggregationContainer>>,
) -> Self
pub fn aggregations( self, value: impl Into<IndexMap<String, AggregationContainer>>, ) -> Self
Sets aggregations.
Sourcepub fn source(self, value: impl Into<SourceConfig>) -> Self
pub fn source(self, value: impl Into<SourceConfig>) -> Self
Sets source.
Sourcepub fn fields(self, value: impl Into<Vec<FieldAndFormat>>) -> Self
pub fn fields(self, value: impl Into<Vec<FieldAndFormat>>) -> Self
Sets fields.
Sourcepub fn query(self, value: impl Into<QueryContainer>) -> Self
pub fn query(self, value: impl Into<QueryContainer>) -> Self
Sets query.
Sourcepub fn track_total_hits(self, value: impl Into<TrackHits>) -> Self
pub fn track_total_hits(self, value: impl Into<TrackHits>) -> Self
Sets track_total_hits.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more