Struct datadog_api_client::datadogV1::api::api_usage_metering::GetIngestedSpansOptionalParams
source · #[non_exhaustive]pub struct GetIngestedSpansOptionalParams {
pub end_hr: Option<DateTime<Utc>>,
}Expand description
GetIngestedSpansOptionalParams is a struct for passing parameters to the method UsageMeteringAPI::get_ingested_spans
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.
Implementations§
source§impl GetIngestedSpansOptionalParams
impl GetIngestedSpansOptionalParams
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_GetIngestedSpans.rs (lines 16-20)
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
async fn main() {
let configuration = datadog::Configuration::new();
let api = UsageMeteringAPI::with_config(configuration);
let resp = api
.get_ingested_spans(
DateTime::parse_from_rfc3339("2021-11-06T11:11:11+00:00")
.expect("Failed to parse datetime")
.with_timezone(&Utc),
GetIngestedSpansOptionalParams::default().end_hr(
DateTime::parse_from_rfc3339("2021-11-08T11:11:11+00:00")
.expect("Failed to parse datetime")
.with_timezone(&Utc),
),
)
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}Trait Implementations§
source§impl Clone for GetIngestedSpansOptionalParams
impl Clone for GetIngestedSpansOptionalParams
source§fn clone(&self) -> GetIngestedSpansOptionalParams
fn clone(&self) -> GetIngestedSpansOptionalParams
Returns a copy 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 GetIngestedSpansOptionalParams
impl Default for GetIngestedSpansOptionalParams
source§fn default() -> GetIngestedSpansOptionalParams
fn default() -> GetIngestedSpansOptionalParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GetIngestedSpansOptionalParams
impl RefUnwindSafe for GetIngestedSpansOptionalParams
impl Send for GetIngestedSpansOptionalParams
impl Sync for GetIngestedSpansOptionalParams
impl Unpin for GetIngestedSpansOptionalParams
impl UnwindSafe for GetIngestedSpansOptionalParams
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)