#[non_exhaustive]pub struct SearchIncidentsOptionalParams {
pub include: Option<IncidentRelatedObject>,
pub sort: Option<IncidentSearchSortOrder>,
pub page_size: Option<i64>,
pub page_offset: Option<i64>,
}
Expand description
SearchIncidentsOptionalParams is a struct for passing parameters to the method IncidentsAPI::search_incidents
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.include: Option<IncidentRelatedObject>
Specifies which types of related objects should be included in the response.
sort: Option<IncidentSearchSortOrder>
Specifies the order of returned incidents.
page_size: Option<i64>
Size for a given page. The maximum allowed value is 100.
page_offset: Option<i64>
Specific offset to use as the beginning of the returned page.
Implementations§
Source§impl SearchIncidentsOptionalParams
impl SearchIncidentsOptionalParams
Sourcepub fn include(self, value: IncidentRelatedObject) -> Self
pub fn include(self, value: IncidentRelatedObject) -> Self
Specifies which types of related objects should be included in the response.
Sourcepub fn sort(self, value: IncidentSearchSortOrder) -> Self
pub fn sort(self, value: IncidentSearchSortOrder) -> Self
Specifies the order of returned incidents.
Sourcepub fn page_size(self, value: i64) -> Self
pub fn page_size(self, value: i64) -> Self
Size for a given page. The maximum allowed value is 100.
Examples found in repository?
examples/v2_incidents_SearchIncidents_1931679109.rs (line 15)
9async fn main() {
10 let mut configuration = datadog::Configuration::new();
11 configuration.set_unstable_operation_enabled("v2.SearchIncidents", true);
12 let api = IncidentsAPI::with_config(configuration);
13 let response = api.search_incidents_with_pagination(
14 "state:(active OR stable OR resolved)".to_string(),
15 SearchIncidentsOptionalParams::default().page_size(2),
16 );
17 pin_mut!(response);
18 while let Some(resp) = response.next().await {
19 if let Ok(value) = resp {
20 println!("{:#?}", value);
21 } else {
22 println!("{:#?}", resp.unwrap_err());
23 }
24 }
25}
Sourcepub fn page_offset(self, value: i64) -> Self
pub fn page_offset(self, value: i64) -> Self
Specific offset to use as the beginning of the returned page.
Trait Implementations§
Source§impl Clone for SearchIncidentsOptionalParams
impl Clone for SearchIncidentsOptionalParams
Source§fn clone(&self) -> SearchIncidentsOptionalParams
fn clone(&self) -> SearchIncidentsOptionalParams
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 Default for SearchIncidentsOptionalParams
impl Default for SearchIncidentsOptionalParams
Source§fn default() -> SearchIncidentsOptionalParams
fn default() -> SearchIncidentsOptionalParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SearchIncidentsOptionalParams
impl RefUnwindSafe for SearchIncidentsOptionalParams
impl Send for SearchIncidentsOptionalParams
impl Sync for SearchIncidentsOptionalParams
impl Unpin for SearchIncidentsOptionalParams
impl UnwindSafe for SearchIncidentsOptionalParams
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