pub struct UserFilter<'a> { /* private fields */ }Expand description
Filter parameters for listing users
Implementations§
Source§impl<'a> UserFilter<'a>
impl<'a> UserFilter<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new UserFilter with default values
Sourcepub fn active_only(self) -> Self
pub fn active_only(self) -> Self
Filter for active users
Sourcepub fn locked_only(self) -> Self
pub fn locked_only(self) -> Self
Filter for locked users
Sourcepub fn deactivated_only(self) -> Self
pub fn deactivated_only(self) -> Self
Filter for deactivated users
Sourcepub fn can_request_admin_only(self) -> Self
pub fn can_request_admin_only(self) -> Self
Filter for users that can request admin privileges
Sourcepub fn cannot_request_admin_only(self) -> Self
pub fn cannot_request_admin_only(self) -> Self
Filter for users that can’t request admin privileges
Sourcepub fn guest_only(self) -> Self
pub fn guest_only(self) -> Self
Filter for guest users
Sourcepub fn non_guest_only(self) -> Self
pub fn non_guest_only(self) -> Self
Filter for non-guest users
Sourcepub fn matching_search(self, search: &'a str) -> Self
pub fn matching_search(self, search: &'a str) -> Self
Filter for users that match the given search string
Sourcepub fn with_active_oauth2_session_for_any_of_clients(
self,
clients: &'a [Ulid],
) -> Self
pub fn with_active_oauth2_session_for_any_of_clients( self, clients: &'a [Ulid], ) -> Self
Filter for users which have at least one active (non-finished)
OAuth2 session belonging to any of the given clients.
The semantics are OR across the clients: a user matches if they have an active session for any of the supplied client IDs.
Sourcepub fn with_active_oauth2_session(self, has: bool) -> Self
pub fn with_active_oauth2_session(self, has: bool) -> Self
Filter for users which have (or don’t have) at least one active
(non-finished) OAuth2 session, regardless of the client.
Sourcepub fn with_active_compat_session(self, has: bool) -> Self
pub fn with_active_compat_session(self, has: bool) -> Self
Filter for users which have (or don’t have) at least one active (non-finished) compatibility session.
Sourcepub fn state(&self) -> Option<UserState>
pub fn state(&self) -> Option<UserState>
Get the state filter
Returns None if no state filter was set
Sourcepub fn can_request_admin(&self) -> Option<bool>
pub fn can_request_admin(&self) -> Option<bool>
Get the can request admin filter
Returns None if no can request admin filter was set
Sourcepub fn is_guest(&self) -> Option<bool>
pub fn is_guest(&self) -> Option<bool>
Get the is guest filter
Returns None if no is guest filter was set
Sourcepub fn search(&self) -> Option<&'a str>
pub fn search(&self) -> Option<&'a str>
Get the search filter
Returns None if no search filter was set
Sourcepub fn active_oauth2_session_for_any_of_clients(&self) -> Option<&'a [Ulid]>
pub fn active_oauth2_session_for_any_of_clients(&self) -> Option<&'a [Ulid]>
Get the active-OAuth2-session-for-any-of-clients filter
Returns None if no such filter was set
Sourcepub fn has_active_oauth2_session(&self) -> Option<bool>
pub fn has_active_oauth2_session(&self) -> Option<bool>
Get the has-active-OAuth2-session filter
Returns None if no such filter was set
Sourcepub fn has_active_compat_session(&self) -> Option<bool>
pub fn has_active_compat_session(&self) -> Option<bool>
Get the has-active-compat-session filter
Returns None if no such filter was set
Trait Implementations§
Source§impl<'a> Clone for UserFilter<'a>
impl<'a> Clone for UserFilter<'a>
impl<'a> Copy for UserFilter<'a>
Source§impl<'a> Debug for UserFilter<'a>
impl<'a> Debug for UserFilter<'a>
Source§impl<'a> Default for UserFilter<'a>
impl<'a> Default for UserFilter<'a>
impl<'a> Eq for UserFilter<'a>
Source§impl<'a> PartialEq for UserFilter<'a>
impl<'a> PartialEq for UserFilter<'a>
impl<'a> StructuralPartialEq for UserFilter<'a>
Auto Trait Implementations§
impl<'a> Freeze for UserFilter<'a>
impl<'a> RefUnwindSafe for UserFilter<'a>
impl<'a> Send for UserFilter<'a>
impl<'a> Sync for UserFilter<'a>
impl<'a> Unpin for UserFilter<'a>
impl<'a> UnsafeUnpin for UserFilter<'a>
impl<'a> UnwindSafe for UserFilter<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more