#[non_exhaustive]pub struct Stats {
pub group_by: String,
pub aggregates: Vec<Aggregate>,
/* private fields */
}Expand description
Stats indicates the type of aggregate and the corresponding aggregates.
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.group_by: StringgroupBy specifies the type of aggregate.
For example a group_by might be "state"
aggregates: Vec<Aggregate>Aggregates is a list <group, count> pairs. For example, if the
group_by is "state" a possible tuple in the aggregates list could be
“SCHEDULED” : 11,
Implementations§
Source§impl Stats
impl Stats
pub fn new() -> Self
Sourcepub fn set_group_by<T: Into<String>>(self, v: T) -> Self
pub fn set_group_by<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_aggregates<T, V>(self, v: T) -> Self
pub fn set_aggregates<T, V>(self, v: T) -> Self
Sets the value of aggregates.
§Example
ⓘ
use google_cloud_maintenance_api_v1::model::maintenance_summary::Aggregate;
let x = Stats::new()
.set_aggregates([
Aggregate::default()/* use setters */,
Aggregate::default()/* use (different) setters */,
]);Trait Implementations§
impl StructuralPartialEq for Stats
Auto Trait Implementations§
impl Freeze for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnwindSafe for Stats
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