pub struct AggregationRequest {
pub aggregations: Vec<Aggregation>,
}Expand description
Aggregation request for STAC API.
Fields§
§aggregations: Vec<Aggregation>Aggregations to compute.
Implementations§
Source§impl AggregationRequest
impl AggregationRequest
Sourcepub fn add(self, aggregation: Aggregation) -> Self
pub fn add(self, aggregation: Aggregation) -> Self
Adds an aggregation to the request.
Sourcepub fn count(name: impl Into<String>) -> Aggregation
pub fn count(name: impl Into<String>) -> Aggregation
Creates a count aggregation.
Sourcepub fn sum(name: impl Into<String>, field: impl Into<String>) -> Aggregation
pub fn sum(name: impl Into<String>, field: impl Into<String>) -> Aggregation
Creates a sum aggregation.
Sourcepub fn avg(name: impl Into<String>, field: impl Into<String>) -> Aggregation
pub fn avg(name: impl Into<String>, field: impl Into<String>) -> Aggregation
Creates an average aggregation.
Sourcepub fn min(name: impl Into<String>, field: impl Into<String>) -> Aggregation
pub fn min(name: impl Into<String>, field: impl Into<String>) -> Aggregation
Creates a min aggregation.
Sourcepub fn max(name: impl Into<String>, field: impl Into<String>) -> Aggregation
pub fn max(name: impl Into<String>, field: impl Into<String>) -> Aggregation
Creates a max aggregation.
Sourcepub fn stats(name: impl Into<String>, field: impl Into<String>) -> Aggregation
pub fn stats(name: impl Into<String>, field: impl Into<String>) -> Aggregation
Creates a stats aggregation.
Sourcepub fn terms(name: impl Into<String>, field: impl Into<String>) -> Aggregation
pub fn terms(name: impl Into<String>, field: impl Into<String>) -> Aggregation
Creates a terms aggregation.
Sourcepub fn histogram(
name: impl Into<String>,
field: impl Into<String>,
interval: f64,
) -> Aggregation
pub fn histogram( name: impl Into<String>, field: impl Into<String>, interval: f64, ) -> Aggregation
Creates a histogram aggregation.
Sourcepub fn date_histogram(
name: impl Into<String>,
field: impl Into<String>,
interval: impl Into<String>,
) -> Aggregation
pub fn date_histogram( name: impl Into<String>, field: impl Into<String>, interval: impl Into<String>, ) -> Aggregation
Creates a date histogram aggregation.
Sourcepub fn geohash_grid(
name: impl Into<String>,
field: impl Into<String>,
precision: u8,
) -> Result<Aggregation>
pub fn geohash_grid( name: impl Into<String>, field: impl Into<String>, precision: u8, ) -> Result<Aggregation>
Creates a geohash grid aggregation.
Trait Implementations§
Source§impl Clone for AggregationRequest
impl Clone for AggregationRequest
Source§fn clone(&self) -> AggregationRequest
fn clone(&self) -> AggregationRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AggregationRequest
impl Debug for AggregationRequest
Source§impl Default for AggregationRequest
impl Default for AggregationRequest
Source§impl<'de> Deserialize<'de> for AggregationRequest
impl<'de> Deserialize<'de> for AggregationRequest
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
Auto Trait Implementations§
impl Freeze for AggregationRequest
impl RefUnwindSafe for AggregationRequest
impl Send for AggregationRequest
impl Sync for AggregationRequest
impl Unpin for AggregationRequest
impl UnsafeUnpin for AggregationRequest
impl UnwindSafe for AggregationRequest
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