#[non_exhaustive]pub struct IssuesSearchRequestDataAttributes {
pub from: i64,
pub order_by: Option<IssuesSearchRequestDataAttributesOrderBy>,
pub persona: Option<IssuesSearchRequestDataAttributesPersona>,
pub query: String,
pub to: i64,
pub track: Option<IssuesSearchRequestDataAttributesTrack>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
Object describing a search issue request.
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.from: i64
Start date (inclusive) of the query in milliseconds since the Unix epoch.
order_by: Option<IssuesSearchRequestDataAttributesOrderBy>
The attribute to sort the search results by.
persona: Option<IssuesSearchRequestDataAttributesPersona>
Persona for the search. Either track(s) or persona(s) must be specified.
query: String
Search query following the event search syntax.
to: i64
End date (exclusive) of the query in milliseconds since the Unix epoch.
track: Option<IssuesSearchRequestDataAttributesTrack>
Track of the events to query. Either track(s) or persona(s) must be specified.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl IssuesSearchRequestDataAttributes
impl IssuesSearchRequestDataAttributes
Sourcepub fn new(
from: i64,
query: String,
to: i64,
) -> IssuesSearchRequestDataAttributes
pub fn new( from: i64, query: String, to: i64, ) -> IssuesSearchRequestDataAttributes
Examples found in repository?
examples/v2_error-tracking_SearchIssues.rs (lines 14-18)
12async fn main() {
13 let body = IssuesSearchRequest::new(IssuesSearchRequestData::new(
14 IssuesSearchRequestDataAttributes::new(
15 1671612804000,
16 "service:orders-* AND @language:go".to_string(),
17 1671620004000,
18 )
19 .track(IssuesSearchRequestDataAttributesTrack::TRACE),
20 IssuesSearchRequestDataType::SEARCH_REQUEST,
21 ));
22 let configuration = datadog::Configuration::new();
23 let api = ErrorTrackingAPI::with_config(configuration);
24 let resp = api
25 .search_issues(body, SearchIssuesOptionalParams::default())
26 .await;
27 if let Ok(value) = resp {
28 println!("{:#?}", value);
29 } else {
30 println!("{:#?}", resp.unwrap_err());
31 }
32}
pub fn order_by(self, value: IssuesSearchRequestDataAttributesOrderBy) -> Self
pub fn persona(self, value: IssuesSearchRequestDataAttributesPersona) -> Self
Sourcepub fn track(self, value: IssuesSearchRequestDataAttributesTrack) -> Self
pub fn track(self, value: IssuesSearchRequestDataAttributesTrack) -> Self
Examples found in repository?
examples/v2_error-tracking_SearchIssues.rs (line 19)
12async fn main() {
13 let body = IssuesSearchRequest::new(IssuesSearchRequestData::new(
14 IssuesSearchRequestDataAttributes::new(
15 1671612804000,
16 "service:orders-* AND @language:go".to_string(),
17 1671620004000,
18 )
19 .track(IssuesSearchRequestDataAttributesTrack::TRACE),
20 IssuesSearchRequestDataType::SEARCH_REQUEST,
21 ));
22 let configuration = datadog::Configuration::new();
23 let api = ErrorTrackingAPI::with_config(configuration);
24 let resp = api
25 .search_issues(body, SearchIssuesOptionalParams::default())
26 .await;
27 if let Ok(value) = resp {
28 println!("{:#?}", value);
29 } else {
30 println!("{:#?}", resp.unwrap_err());
31 }
32}
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for IssuesSearchRequestDataAttributes
impl Clone for IssuesSearchRequestDataAttributes
Source§fn clone(&self) -> IssuesSearchRequestDataAttributes
fn clone(&self) -> IssuesSearchRequestDataAttributes
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<'de> Deserialize<'de> for IssuesSearchRequestDataAttributes
impl<'de> Deserialize<'de> for IssuesSearchRequestDataAttributes
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 IssuesSearchRequestDataAttributes
impl PartialEq for IssuesSearchRequestDataAttributes
Source§fn eq(&self, other: &IssuesSearchRequestDataAttributes) -> bool
fn eq(&self, other: &IssuesSearchRequestDataAttributes) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for IssuesSearchRequestDataAttributes
Auto Trait Implementations§
impl Freeze for IssuesSearchRequestDataAttributes
impl RefUnwindSafe for IssuesSearchRequestDataAttributes
impl Send for IssuesSearchRequestDataAttributes
impl Sync for IssuesSearchRequestDataAttributes
impl Unpin for IssuesSearchRequestDataAttributes
impl UnwindSafe for IssuesSearchRequestDataAttributes
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