#[non_exhaustive]pub struct GetUsageRumSessionsOptionalParams {
pub end_hr: Option<DateTime<Utc>>,
pub type_: Option<String>,
}
Expand description
GetUsageRumSessionsOptionalParams is a struct for passing parameters to the method UsageMeteringAPI::get_usage_rum_sessions
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.end_hr: Option<DateTime<Utc>>
Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour.
type_: Option<String>
RUM type: [browser, mobile]
. Defaults to browser
.
Implementations§
Source§impl GetUsageRumSessionsOptionalParams
impl GetUsageRumSessionsOptionalParams
Sourcepub fn end_hr(self, value: DateTime<Utc>) -> Self
pub fn end_hr(self, value: DateTime<Utc>) -> Self
Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour.
Examples found in repository?
examples/v1_usage-metering_GetUsageRumSessions_714937291.rs (lines 16-20)
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_rum_sessions(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageRumSessionsOptionalParams::default().end_hr(
17 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
18 .expect("Failed to parse datetime")
19 .with_timezone(&Utc),
20 ),
21 )
22 .await;
23 if let Ok(value) = resp {
24 println!("{:#?}", value);
25 } else {
26 println!("{:#?}", resp.unwrap_err());
27 }
28}
More examples
examples/v1_usage-metering_GetUsageRumSessions_3271366243.rs (lines 17-21)
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_rum_sessions(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageRumSessionsOptionalParams::default()
17 .end_hr(
18 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
19 .expect("Failed to parse datetime")
20 .with_timezone(&Utc),
21 )
22 .type_("mobile".to_string()),
23 )
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
Sourcepub fn type_(self, value: String) -> Self
pub fn type_(self, value: String) -> Self
RUM type: [browser, mobile]
. Defaults to browser
.
Examples found in repository?
examples/v1_usage-metering_GetUsageRumSessions_3271366243.rs (line 22)
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = UsageMeteringAPI::with_config(configuration);
11 let resp = api
12 .get_usage_rum_sessions(
13 DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
14 .expect("Failed to parse datetime")
15 .with_timezone(&Utc),
16 GetUsageRumSessionsOptionalParams::default()
17 .end_hr(
18 DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
19 .expect("Failed to parse datetime")
20 .with_timezone(&Utc),
21 )
22 .type_("mobile".to_string()),
23 )
24 .await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}
Trait Implementations§
Source§impl Clone for GetUsageRumSessionsOptionalParams
impl Clone for GetUsageRumSessionsOptionalParams
Source§fn clone(&self) -> GetUsageRumSessionsOptionalParams
fn clone(&self) -> GetUsageRumSessionsOptionalParams
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 GetUsageRumSessionsOptionalParams
impl Default for GetUsageRumSessionsOptionalParams
Source§fn default() -> GetUsageRumSessionsOptionalParams
fn default() -> GetUsageRumSessionsOptionalParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GetUsageRumSessionsOptionalParams
impl RefUnwindSafe for GetUsageRumSessionsOptionalParams
impl Send for GetUsageRumSessionsOptionalParams
impl Sync for GetUsageRumSessionsOptionalParams
impl Unpin for GetUsageRumSessionsOptionalParams
impl UnwindSafe for GetUsageRumSessionsOptionalParams
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