pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub async fn search_with( &self, params: SearchParams, ) -> Result<SearchResult, Error>
Source§impl Client
impl Client
pub fn is_connected(&self) -> bool
Sourcepub async fn reconnect(&self) -> Result<(), Error>
pub async fn reconnect(&self) -> Result<(), Error>
Open a new connection and, when a service account is configured, bind with it. Any other identity is not restored: a caller that bound with its own credentials binds again.
pub async fn rebind_service_account(&self) -> Result<(), Error>
pub async fn simple_bind( &self, dn: impl Into<String>, password: &SecretString, ) -> Result<(), Error>
pub async fn sasl_external_bind(&self) -> Result<(), Error>
Sourcepub async fn bind(&self, credentials: BindCredentials<'_>) -> Result<(), Error>
pub async fn bind(&self, credentials: BindCredentials<'_>) -> Result<(), Error>
Bind using one of the supported credential types.
Sourcepub async fn unbind(&self) -> Result<(), Error>
pub async fn unbind(&self) -> Result<(), Error>
Send an unbind request. The connection is closed afterwards.
Sourcepub async fn search(
&self,
base_dn: impl Into<String>,
scope: SearchScope,
filter: Filter,
attrs: Vec<String>,
) -> Result<Vec<SearchResultEntry>, Error>
pub async fn search( &self, base_dn: impl Into<String>, scope: SearchScope, filter: Filter, attrs: Vec<String>, ) -> Result<Vec<SearchResultEntry>, Error>
An empty base_dn means the base DN the client was configured with.
pub async fn search_with_controls( &self, base_dn: impl Into<String>, scope: SearchScope, filter: Filter, attrs: Vec<String>, controls: Vec<Control>, ) -> Result<(Vec<SearchResultEntry>, Vec<Control>), Error>
pub async fn search_full( &self, base_dn: impl Into<String>, scope: SearchScope, filter: Filter, attrs: Vec<String>, controls: Vec<Control>, ) -> Result<SearchResult, Error>
pub async fn search_paged( &self, base_dn: &str, scope: SearchScope, filter: Filter, attrs: Vec<String>, page_size: i32, ) -> Result<Vec<SearchResultEntry>, Error>
pub fn search_paged_stream( &self, base_dn: &str, scope: SearchScope, filter: Filter, attrs: Vec<String>, page_size: i32, ) -> PagedSearch<'_>
pub async fn search_one( &self, base_dn: impl Into<String>, scope: SearchScope, filter: Filter, attrs: Vec<String>, ) -> Result<Option<SearchResultEntry>, Error>
pub async fn root_dse(&self) -> Result<SearchResultEntry, Error>
Sourcepub async fn search_range(
&self,
base_dn: &str,
filter: Filter,
attr: &str,
) -> Result<Vec<Vec<u8>>, Error>
pub async fn search_range( &self, base_dn: &str, filter: Filter, attr: &str, ) -> Result<Vec<Vec<u8>>, Error>
Retrieve all values of a multi-valued attribute using Active Directory range retrieval.
AD limits the number of values returned per request (typically 1500).
This method loops, requesting attr;range=N-* with BaseObject scope
until all values are collected.
pub async fn add( &self, dn: impl Into<String>, attrs: Vec<PartialAttribute>, ) -> Result<(), Error>
pub async fn modify( &self, dn: impl Into<String>, changes: Vec<Modification>, ) -> Result<(), Error>
pub async fn delete(&self, dn: impl Into<String>) -> Result<(), Error>
pub async fn compare( &self, dn: impl Into<String>, attr: impl Into<String>, value: impl AsRef<[u8]>, ) -> Result<bool, Error>
pub async fn modify_dn( &self, dn: impl Into<String>, new_rdn: impl Into<String>, delete_old_rdn: bool, new_superior: Option<String>, ) -> Result<(), Error>
Sourcepub async fn extended(
&self,
oid: impl Into<String>,
value: Option<Vec<u8>>,
) -> Result<ExtendedResponse, Error>
pub async fn extended( &self, oid: impl Into<String>, value: Option<Vec<u8>>, ) -> Result<ExtendedResponse, Error>
Send an extended request. StartTLS is refused: it is negotiated when
the connection opens, with Transport::StartTls.
pub async fn who_am_i(&self) -> Result<Option<String>, Error>
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Forget for Client
impl Move for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
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