pub struct UserQueryBuilder {
pub name: Option<String>,
pub uid: Option<u64>,
pub gid: Option<u64>,
pub comment: Option<String>,
pub home: Option<String>,
pub shell: Option<String>,
}
Fields§
§name: Option<String>
§uid: Option<u64>
§gid: Option<u64>
§comment: Option<String>
§home: Option<String>
§shell: Option<String>
Implementations§
Source§impl UserQueryBuilder
impl UserQueryBuilder
Sourcepub fn build(self) -> Option<impl Query<User>>
pub fn build(self) -> Option<impl Query<User>>
Build a Query<User>
, returning None if all elements of the QueryBuilder are None.
Sourcepub fn with_name(self, name: &str) -> Self
pub fn with_name(self, name: &str) -> Self
add a name
to the query, replacing it if it already exists.
Sourcepub fn with_uid(self, uid: u64) -> Self
pub fn with_uid(self, uid: u64) -> Self
add a uid
to the query, replacing it if it already exists.
Sourcepub fn with_gid(self, gid: u64) -> Self
pub fn with_gid(self, gid: u64) -> Self
add a gid
to the query, replacing it if it already exists.
Sourcepub fn with_comment(self, comment: &str) -> Self
pub fn with_comment(self, comment: &str) -> Self
add a comment
to the query, replacing it if it already exists.
Sourcepub fn with_home(self, home: &str) -> Self
pub fn with_home(self, home: &str) -> Self
add a home
to the query, replacing it if it already exists
Sourcepub fn with_shell(self, shell: &str) -> Self
pub fn with_shell(self, shell: &str) -> Self
add a shell
to the query, replacing it if it already exists
Trait Implementations§
Source§impl Clone for UserQueryBuilder
impl Clone for UserQueryBuilder
Source§fn clone(&self) -> UserQueryBuilder
fn clone(&self) -> UserQueryBuilder
Returns a copy 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 UserQueryBuilder
impl Debug for UserQueryBuilder
Source§impl Default for UserQueryBuilder
impl Default for UserQueryBuilder
Source§fn default() -> UserQueryBuilder
fn default() -> UserQueryBuilder
Returns the “default value” for a type. Read more
Source§impl PartialEq for UserQueryBuilder
impl PartialEq for UserQueryBuilder
impl StructuralPartialEq for UserQueryBuilder
Auto Trait Implementations§
impl Freeze for UserQueryBuilder
impl RefUnwindSafe for UserQueryBuilder
impl Send for UserQueryBuilder
impl Sync for UserQueryBuilder
impl Unpin for UserQueryBuilder
impl UnwindSafe for UserQueryBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)