pub struct LdapServerConn { /* private fields */ }
Expand description
Connection to running LDAP server
Implementations§
Source§impl LdapServerConn
impl LdapServerConn
Sourcepub fn ssl_cert_pem(&self) -> &str
pub fn ssl_cert_pem(&self) -> &str
PEM Certificate for ssl port
Sourcepub fn server_dir(&self) -> &Path
pub fn server_dir(&self) -> &Path
LDAP server directory location
Sourcepub async fn clone_to_dir<P: AsRef<Path>>(&self, desc: P)
pub async fn clone_to_dir<P: AsRef<Path>>(&self, desc: P)
Clone LDAP server files to new location
Sourcepub async fn add(&self, ldif_text: &str) -> &Self
pub async fn add(&self, ldif_text: &str) -> &Self
Apply LDIF from text
§Examples
server.add("dn: cn=Philip J. Fry,dc=planetexpress,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: top
cn: Philip J. Fry
givenName: Philip
sn: Fry").await;
Sourcepub async fn modify(&self, ldif_text: &str) -> &Self
pub async fn modify(&self, ldif_text: &str) -> &Self
Apply modification LDIF from text
§Examples
server.modify("dn: cn=Philip J. Fry,dc=planetexpress,dc=com
changetype: modify
add: displayName
displayName: Philip J. Fry").await;
Sourcepub async fn modify_file<P: AsRef<Path>>(&self, file: P) -> &Self
pub async fn modify_file<P: AsRef<Path>>(&self, file: P) -> &Self
Apply modification LDIF from file
Sourcepub async fn delete(&self, ldif_text: &str) -> &Self
pub async fn delete(&self, ldif_text: &str) -> &Self
Apply deletion LDIF from text
§Examples
server.delete("dn: cn=Philip J. Fry,dc=planetexpress,dc=com
changetype: delete").await;
Sourcepub async fn delete_file<P: AsRef<Path>>(&self, file: P) -> &Self
pub async fn delete_file<P: AsRef<Path>>(&self, file: P) -> &Self
Apply deletion LDIF from file
Trait Implementations§
Source§impl Debug for LdapServerConn
impl Debug for LdapServerConn
Auto Trait Implementations§
impl Freeze for LdapServerConn
impl !RefUnwindSafe for LdapServerConn
impl Send for LdapServerConn
impl Sync for LdapServerConn
impl Unpin for LdapServerConn
impl !UnwindSafe for LdapServerConn
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