pub struct UserQuery {
pub user_name: Option<String>,
pub email_address: Option<String>,
pub role_id: Option<String>,
pub user_type: Option<UserType>,
pub login_status: Option<String>,
pub page: Option<u32>,
pub size: Option<u32>,
}
Expand description
Query parameters for user search
Fields§
§user_name: Option<String>
Filter by username
email_address: Option<String>
Filter by email address
role_id: Option<String>
Filter by role ID
user_type: Option<UserType>
Filter by user type
login_status: Option<String>
Filter by login status
page: Option<u32>
Page number
size: Option<u32>
Items per page
Implementations§
Source§impl UserQuery
impl UserQuery
Sourcepub fn with_username(self, username: impl Into<String>) -> Self
pub fn with_username(self, username: impl Into<String>) -> Self
Filter by username
Sourcepub fn with_email(self, email: impl Into<String>) -> Self
pub fn with_email(self, email: impl Into<String>) -> Self
Filter by email address
Sourcepub fn with_role_id(self, role_id: impl Into<String>) -> Self
pub fn with_role_id(self, role_id: impl Into<String>) -> Self
Filter by role ID
Sourcepub fn with_user_type(self, user_type: UserType) -> Self
pub fn with_user_type(self, user_type: UserType) -> Self
Filter by user type
Sourcepub fn with_pagination(self, page: u32, size: u32) -> Self
pub fn with_pagination(self, page: u32, size: u32) -> Self
Set pagination
Sourcepub fn to_query_params(&self) -> Vec<(String, String)>
pub fn to_query_params(&self) -> Vec<(String, String)>
Convert to query parameters
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UserQuery
impl RefUnwindSafe for UserQuery
impl Send for UserQuery
impl Sync for UserQuery
impl Unpin for UserQuery
impl UnwindSafe for UserQuery
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