#[non_exhaustive]pub struct EventsRequestPage {
pub cursor: Option<String>,
pub limit: Option<i32>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Pagination settings.
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.cursor: Option<String>
The returned paging point to use to get the next results.
limit: Option<i32>
The maximum number of logs in the response.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl EventsRequestPage
impl EventsRequestPage
Sourcepub fn new() -> EventsRequestPage
pub fn new() -> EventsRequestPage
Examples found in repository?
examples/v2_events_SearchEvents.rs (line 19)
11async fn main() {
12 let body = EventsListRequest::new()
13 .filter(
14 EventsQueryFilter::new()
15 .from("2020-09-17T11:48:36+01:00".to_string())
16 .query("datadog-agent".to_string())
17 .to("2020-09-17T12:48:36+01:00".to_string()),
18 )
19 .page(EventsRequestPage::new().limit(5))
20 .sort(EventsSort::TIMESTAMP_ASCENDING);
21 let configuration = datadog::Configuration::new();
22 let api = EventsAPI::with_config(configuration);
23 let resp = api
24 .search_events(SearchEventsOptionalParams::default().body(body))
25 .await;
26 if let Ok(value) = resp {
27 println!("{:#?}", value);
28 } else {
29 println!("{:#?}", resp.unwrap_err());
30 }
31}
More examples
examples/v2_events_SearchEvents_3856995058.rs (line 22)
14async fn main() {
15 let body = EventsListRequest::new()
16 .filter(
17 EventsQueryFilter::new()
18 .from("now-15m".to_string())
19 .to("now".to_string()),
20 )
21 .options(EventsQueryOptions::new().timezone("GMT".to_string()))
22 .page(EventsRequestPage::new().limit(2))
23 .sort(EventsSort::TIMESTAMP_ASCENDING);
24 let configuration = datadog::Configuration::new();
25 let api = EventsAPI::with_config(configuration);
26 let response =
27 api.search_events_with_pagination(SearchEventsOptionalParams::default().body(body));
28 pin_mut!(response);
29 while let Some(resp) = response.next().await {
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35 }
36}
pub fn cursor(self, value: String) -> Self
Sourcepub fn limit(self, value: i32) -> Self
pub fn limit(self, value: i32) -> Self
Examples found in repository?
examples/v2_events_SearchEvents.rs (line 19)
11async fn main() {
12 let body = EventsListRequest::new()
13 .filter(
14 EventsQueryFilter::new()
15 .from("2020-09-17T11:48:36+01:00".to_string())
16 .query("datadog-agent".to_string())
17 .to("2020-09-17T12:48:36+01:00".to_string()),
18 )
19 .page(EventsRequestPage::new().limit(5))
20 .sort(EventsSort::TIMESTAMP_ASCENDING);
21 let configuration = datadog::Configuration::new();
22 let api = EventsAPI::with_config(configuration);
23 let resp = api
24 .search_events(SearchEventsOptionalParams::default().body(body))
25 .await;
26 if let Ok(value) = resp {
27 println!("{:#?}", value);
28 } else {
29 println!("{:#?}", resp.unwrap_err());
30 }
31}
More examples
examples/v2_events_SearchEvents_3856995058.rs (line 22)
14async fn main() {
15 let body = EventsListRequest::new()
16 .filter(
17 EventsQueryFilter::new()
18 .from("now-15m".to_string())
19 .to("now".to_string()),
20 )
21 .options(EventsQueryOptions::new().timezone("GMT".to_string()))
22 .page(EventsRequestPage::new().limit(2))
23 .sort(EventsSort::TIMESTAMP_ASCENDING);
24 let configuration = datadog::Configuration::new();
25 let api = EventsAPI::with_config(configuration);
26 let response =
27 api.search_events_with_pagination(SearchEventsOptionalParams::default().body(body));
28 pin_mut!(response);
29 while let Some(resp) = response.next().await {
30 if let Ok(value) = resp {
31 println!("{:#?}", value);
32 } else {
33 println!("{:#?}", resp.unwrap_err());
34 }
35 }
36}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for EventsRequestPage
impl Clone for EventsRequestPage
Source§fn clone(&self) -> EventsRequestPage
fn clone(&self) -> EventsRequestPage
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 EventsRequestPage
impl Debug for EventsRequestPage
Source§impl Default for EventsRequestPage
impl Default for EventsRequestPage
Source§impl<'de> Deserialize<'de> for EventsRequestPage
impl<'de> Deserialize<'de> for EventsRequestPage
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
Source§impl PartialEq for EventsRequestPage
impl PartialEq for EventsRequestPage
Source§impl Serialize for EventsRequestPage
impl Serialize for EventsRequestPage
impl StructuralPartialEq for EventsRequestPage
Auto Trait Implementations§
impl Freeze for EventsRequestPage
impl RefUnwindSafe for EventsRequestPage
impl Send for EventsRequestPage
impl Sync for EventsRequestPage
impl Unpin for EventsRequestPage
impl UnwindSafe for EventsRequestPage
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