#[non_exhaustive]pub struct ListServiceDefinitionsOptionalParams {
pub page_size: Option<i64>,
pub page_number: Option<i64>,
pub schema_version: Option<ServiceDefinitionSchemaVersions>,
}
Expand description
ListServiceDefinitionsOptionalParams is a struct for passing parameters to the method ServiceDefinitionAPI::list_service_definitions
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.page_size: Option<i64>
Size for a given page. The maximum allowed value is 100.
page_number: Option<i64>
Specific page number to return.
schema_version: Option<ServiceDefinitionSchemaVersions>
The schema version desired in the response.
Implementations§
Source§impl ListServiceDefinitionsOptionalParams
impl ListServiceDefinitionsOptionalParams
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_service-definition_ListServiceDefinitions_336468013.rs (line 13)
9async fn main() {
10 let configuration = datadog::Configuration::new();
11 let api = ServiceDefinitionAPI::with_config(configuration);
12 let response = api.list_service_definitions_with_pagination(
13 ListServiceDefinitionsOptionalParams::default().page_size(2),
14 );
15 pin_mut!(response);
16 while let Some(resp) = response.next().await {
17 if let Ok(value) = resp {
18 println!("{:#?}", value);
19 } else {
20 println!("{:#?}", resp.unwrap_err());
21 }
22 }
23}
Sourcepub fn page_number(self, value: i64) -> Self
pub fn page_number(self, value: i64) -> Self
Specific page number to return.
Sourcepub fn schema_version(self, value: ServiceDefinitionSchemaVersions) -> Self
pub fn schema_version(self, value: ServiceDefinitionSchemaVersions) -> Self
The schema version desired in the response.
Examples found in repository?
examples/v2_service-definition_ListServiceDefinitions.rs (line 14)
8async fn main() {
9 let configuration = datadog::Configuration::new();
10 let api = ServiceDefinitionAPI::with_config(configuration);
11 let resp = api
12 .list_service_definitions(
13 ListServiceDefinitionsOptionalParams::default()
14 .schema_version(ServiceDefinitionSchemaVersions::V2_1),
15 )
16 .await;
17 if let Ok(value) = resp {
18 println!("{:#?}", value);
19 } else {
20 println!("{:#?}", resp.unwrap_err());
21 }
22}
Trait Implementations§
Source§impl Clone for ListServiceDefinitionsOptionalParams
impl Clone for ListServiceDefinitionsOptionalParams
Source§fn clone(&self) -> ListServiceDefinitionsOptionalParams
fn clone(&self) -> ListServiceDefinitionsOptionalParams
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 ListServiceDefinitionsOptionalParams
impl Default for ListServiceDefinitionsOptionalParams
Source§fn default() -> ListServiceDefinitionsOptionalParams
fn default() -> ListServiceDefinitionsOptionalParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ListServiceDefinitionsOptionalParams
impl RefUnwindSafe for ListServiceDefinitionsOptionalParams
impl Send for ListServiceDefinitionsOptionalParams
impl Sync for ListServiceDefinitionsOptionalParams
impl Unpin for ListServiceDefinitionsOptionalParams
impl UnwindSafe for ListServiceDefinitionsOptionalParams
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