pub struct MockLdapClient { /* private fields */ }Expand description
Mock LDAP client for testing.
Implementations§
Trait Implementations§
Source§impl Default for MockLdapClient
impl Default for MockLdapClient
Source§fn default() -> MockLdapClient
fn default() -> MockLdapClient
Returns the “default value” for a type. Read more
Source§impl LdapOperations for MockLdapClient
impl LdapOperations for MockLdapClient
Source§fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), LdapError>> + Send + 'async_trait>>where
'life0: 'async_trait,
MockLdapClient: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), LdapError>> + Send + 'async_trait>>where
'life0: 'async_trait,
MockLdapClient: 'async_trait,
Connect to the LDAP server.
Source§fn bind<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_dn: &'life1 str,
_password: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), LdapError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MockLdapClient: 'async_trait,
fn bind<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_dn: &'life1 str,
_password: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), LdapError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MockLdapClient: 'async_trait,
Bind with credentials.
Source§fn search<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_base: &'life1 str,
_filter: &'life2 str,
_attrs: &'life3 [&'life4 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<LdapAuthResult>, LdapError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
MockLdapClient: 'async_trait,
fn search<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_base: &'life1 str,
_filter: &'life2 str,
_attrs: &'life3 [&'life4 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<LdapAuthResult>, LdapError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
MockLdapClient: 'async_trait,
Search for entries.
Source§fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
username: &'life1 str,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<LdapAuthResult, LdapError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MockLdapClient: 'async_trait,
fn authenticate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
username: &'life1 str,
password: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<LdapAuthResult, LdapError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
MockLdapClient: 'async_trait,
Authenticate a user and return their info.
Auto Trait Implementations§
impl !Freeze for MockLdapClient
impl RefUnwindSafe for MockLdapClient
impl Send for MockLdapClient
impl Sync for MockLdapClient
impl Unpin for MockLdapClient
impl UnwindSafe for MockLdapClient
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> 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>
Converts
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>
Converts
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