Skip to main content

Client

Struct Client 

Source
pub struct Client { /* private fields */ }

Implementations§

Source§

impl Client

Source

pub fn is_connected(&self) -> bool

Source

pub async fn reconnect(&self) -> Result<(), Error>

Source

pub async fn rebind_service_account(&self) -> Result<(), Error>

Source

pub async fn simple_bind( &self, dn: impl Into<String>, password: &SecretString, ) -> Result<(), Error>

Source

pub async fn search( &self, base_dn: impl Into<String>, scope: SearchScope, filter: Filter, attrs: Vec<String>, ) -> Result<Vec<SearchResultEntry>, Error>

Source

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>

Source

pub async fn search_full( &self, base_dn: impl Into<String>, scope: SearchScope, filter: Filter, attrs: Vec<String>, controls: Vec<Control>, ) -> Result<SearchResult, Error>

Source

pub async fn search_paged( &self, base_dn: &str, scope: SearchScope, filter: Filter, attrs: Vec<String>, page_size: i32, ) -> Result<Vec<SearchResultEntry>, Error>

Source

pub fn search_paged_stream( &self, base_dn: &str, scope: SearchScope, filter: Filter, attrs: Vec<String>, page_size: i32, ) -> PagedSearch<'_>

Source

pub async fn add( &self, dn: impl Into<String>, attrs: Vec<PartialAttribute>, ) -> Result<(), Error>

Source

pub async fn modify( &self, dn: impl Into<String>, changes: Vec<Modification>, ) -> Result<(), Error>

Source

pub async fn delete(&self, dn: impl Into<String>) -> Result<(), Error>

Source

pub async fn compare( &self, dn: impl Into<String>, attr: impl Into<String>, value: impl AsRef<[u8]>, ) -> Result<bool, Error>

Source

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>

Source

pub async fn extended( &self, oid: impl Into<String>, value: Option<Vec<u8>>, ) -> Result<ExtendedResponse, Error>

Source

pub async fn who_am_i(&self) -> Result<Option<String>, Error>

Source

pub async fn search_one( &self, base_dn: impl Into<String>, scope: SearchScope, filter: Filter, attrs: Vec<String>, ) -> Result<Option<SearchResultEntry>, Error>

Source

pub async fn root_dse(&self) -> Result<SearchResultEntry, Error>

Source

pub async fn sasl_external_bind(&self) -> Result<(), Error>

Source

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.

Source

pub async fn bind(&self, credentials: BindCredentials<'_>) -> Result<(), Error>

Bind using one of the supported credential types.

Source

pub async fn unbind(&self) -> Result<(), Error>

Auto Trait Implementations§

§

impl !Freeze for Client

§

impl !RefUnwindSafe for Client

§

impl Send for Client

§

impl Sync for Client

§

impl Unpin for Client

§

impl UnsafeUnpin for Client

§

impl !UnwindSafe for Client

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more