#[non_exhaustive]pub struct ListRolesOptionalParams {
pub page_size: Option<i64>,
pub page_number: Option<i64>,
pub sort: Option<RolesSort>,
pub filter: Option<String>,
pub filter_id: Option<String>,
}
Expand description
ListRolesOptionalParams is a struct for passing parameters to the method RolesAPI::list_roles
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.
sort: Option<RolesSort>
Sort roles depending on the given field. Sort order is ascending by default.
Sort order is descending if the field is prefixed by a negative sign, for example:
sort=-name
.
filter: Option<String>
Filter all roles by the given string.
filter_id: Option<String>
Filter all roles by the given list of role IDs.
Implementations§
Source§impl ListRolesOptionalParams
impl ListRolesOptionalParams
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.
Sourcepub fn page_number(self, value: i64) -> Self
pub fn page_number(self, value: i64) -> Self
Specific page number to return.
Sourcepub fn sort(self, value: RolesSort) -> Self
pub fn sort(self, value: RolesSort) -> Self
Sort roles depending on the given field. Sort order is ascending by default.
Sort order is descending if the field is prefixed by a negative sign, for example:
sort=-name
.
Sourcepub fn filter(self, value: String) -> Self
pub fn filter(self, value: String) -> Self
Filter all roles by the given string.
Examples found in repository?
examples/v2_roles_ListRoles.rs (line 13)
7async fn main() {
8 // there is a valid "role" in the system
9 let role_data_attributes_name = std::env::var("ROLE_DATA_ATTRIBUTES_NAME").unwrap();
10 let configuration = datadog::Configuration::new();
11 let api = RolesAPI::with_config(configuration);
12 let resp = api
13 .list_roles(ListRolesOptionalParams::default().filter(role_data_attributes_name.clone()))
14 .await;
15 if let Ok(value) = resp {
16 println!("{:#?}", value);
17 } else {
18 println!("{:#?}", resp.unwrap_err());
19 }
20}
Trait Implementations§
Source§impl Clone for ListRolesOptionalParams
impl Clone for ListRolesOptionalParams
Source§fn clone(&self) -> ListRolesOptionalParams
fn clone(&self) -> ListRolesOptionalParams
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 Debug for ListRolesOptionalParams
impl Debug for ListRolesOptionalParams
Source§impl Default for ListRolesOptionalParams
impl Default for ListRolesOptionalParams
Source§fn default() -> ListRolesOptionalParams
fn default() -> ListRolesOptionalParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ListRolesOptionalParams
impl RefUnwindSafe for ListRolesOptionalParams
impl Send for ListRolesOptionalParams
impl Sync for ListRolesOptionalParams
impl Unpin for ListRolesOptionalParams
impl UnwindSafe for ListRolesOptionalParams
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