pub async fn list_users(&self, username: Option<String>, email: Option<String>, page: Option<u32>, page_size: Option<u32>) -> Result<Vec<User>> {
        let path = "/users";
        let mut params = Vec::new();
        if let Some(username) = username {
            params.push(("username", username));
        }
        if let Some(email) = email {
            params.push(("email", email));
        }
        if let Some(page) = page {
            params.push(("page", page.to_string()));
        }
        if let Some(page_size) = page_size {
            params.push(("page_size", page_size.to_string()));
        }
        let resp = self.build_request(Method::GET, path).query(&params).send().await?;
        if resp.status().eq(&StatusCode::OK) {
            Ok(resp.json::<Vec<User>>().await?)
        } else {
            Err(anyhow!("failed to list users: {}", resp.text().await?))
        }

    }
/// Get registered users of Harbor.
Get registered users of Harbor.
Get registered users of Harbor .
pub async fn list_users(&self, username: Option<String>, email: Option<String>, page: Option<u32>, page_size: Option<u32>) -> Result<Vec<User>> {
        let path = "/users";
        let mut params = Vec::new();
        if let Some(username) = username {
            params.push(("username", username));
        }
        if let Some(email) = email {
            params.push(("email", email));
        }
        if let Some(page) = page {
            params.push(("page", page.to_string()));
        }
        if let Some(page_size) = page_size {
            params.push(("page_size", page_size.to_string()));
        }
        let resp = self.build_request(Method::GET, path).query(&params).send().await?;
        if resp.status().eq(&StatusCode::OK) {
            Ok(resp.json::<Vec<User>>().await?)
        } else {
            Err(anyhow!("failed to list users: {}", resp.text().await?))
        }
    }
pub async fn list_users ( & self , username : Option < String > , email : Option < String > , page : Option < u32 > , page_size : Option < u32 > ) -> Result < Vec < User > > { let path = " " ; let mut params = Vec :: new ( ) ; if let Some ( username ) = username { params . push ( ( " " , username ) ) ; } if let Some ( email ) = email { params . push ( ( " " , email ) ) ; } if let Some ( page ) = page { params . push ( ( " " , page . to_string ( ) ) ) ; } if let Some ( page_size ) = page_size { params . push ( ( " " , page_size . to_string ( ) ) ) ; } let resp = self . build_request ( Method :: GET , path ) . query ( & params ) . send ( ) . await ? ; if resp . status ( ) . eq ( & StatusCode :: OK ) { Ok ( resp . json :: < Vec < User > > ( ) . await ? ) } else { Err ( anyhow ! ( " " resp text ( ) await ) ) } }
Get registered users of Harbor.
Get registered users of Harbor .
&self
username
Option<String>
email
Option<String>
page
Option<u32>
page_size
Option<u32>
&self
username
Option<String>
email
Option<String>
page
Option<u32>
page_size
Option<u32>