#[non_exhaustive]pub struct ListContainersOptionalParams {
pub filter_tags: Option<String>,
pub group_by: Option<String>,
pub sort: Option<String>,
pub page_size: Option<i32>,
pub page_cursor: Option<String>,
}
Expand description
ListContainersOptionalParams is a struct for passing parameters to the method ContainersAPI::list_containers
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.Comma-separated list of tags to filter containers by.
group_by: Option<String>
Comma-separated list of tags to group containers by.
sort: Option<String>
Attribute to sort containers by.
page_size: Option<i32>
Maximum number of results returned.
page_cursor: Option<String>
String to query the next page of results.
This key is provided with each valid response from the API in meta.pagination.next_cursor
.
Implementations§
Source§impl ListContainersOptionalParams
impl ListContainersOptionalParams
Comma-separated list of tags to filter containers by.
Sourcepub fn group_by(self, value: String) -> Self
pub fn group_by(self, value: String) -> Self
Comma-separated list of tags to group containers by.
Examples found in repository?
examples/v2_containers_ListContainers_2175733917.rs (line 12)
7async fn main() {
8 let configuration = datadog::Configuration::new();
9 let api = ContainersAPI::with_config(configuration);
10 let resp = api
11 .list_containers(
12 ListContainersOptionalParams::default().group_by("short_image".to_string()),
13 )
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
Sourcepub fn page_size(self, value: i32) -> Self
pub fn page_size(self, value: i32) -> Self
Maximum number of results returned.
Examples found in repository?
examples/v2_containers_ListContainers_931009654.rs (line 13)
9async fn main() {
10 let configuration = datadog::Configuration::new();
11 let api = ContainersAPI::with_config(configuration);
12 let response =
13 api.list_containers_with_pagination(ListContainersOptionalParams::default().page_size(2));
14 pin_mut!(response);
15 while let Some(resp) = response.next().await {
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21 }
22}
Sourcepub fn page_cursor(self, value: String) -> Self
pub fn page_cursor(self, value: String) -> Self
String to query the next page of results.
This key is provided with each valid response from the API in meta.pagination.next_cursor
.
Trait Implementations§
Source§impl Clone for ListContainersOptionalParams
impl Clone for ListContainersOptionalParams
Source§fn clone(&self) -> ListContainersOptionalParams
fn clone(&self) -> ListContainersOptionalParams
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ListContainersOptionalParams
impl Debug for ListContainersOptionalParams
Source§impl Default for ListContainersOptionalParams
impl Default for ListContainersOptionalParams
Source§fn default() -> ListContainersOptionalParams
fn default() -> ListContainersOptionalParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ListContainersOptionalParams
impl RefUnwindSafe for ListContainersOptionalParams
impl Send for ListContainersOptionalParams
impl Sync for ListContainersOptionalParams
impl Unpin for ListContainersOptionalParams
impl UnwindSafe for ListContainersOptionalParams
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