Struct ldap_types::basic::DistinguishedName
source · pub struct DistinguishedName {
pub rdns: Vec<RelativeDistinguishedName>,
}
Expand description
a distinguished name is a unique identifier for an entry within the LDAP tree, it is comprised of a comma-separated ordered list of RelativeDistinguishedName components
Fields§
§rdns: Vec<RelativeDistinguishedName>
the RDN components of the DN
Implementations§
source§impl DistinguishedName
impl DistinguishedName
sourcepub fn parent(&self) -> Option<DistinguishedName>
pub fn parent(&self) -> Option<DistinguishedName>
returns the DN for the parent object in the LDAP hierarchy unless this is already the empty DN
sourcepub fn is_ancestor_of(&self, other: &DistinguishedName) -> bool
pub fn is_ancestor_of(&self, other: &DistinguishedName) -> bool
checks if the current DN is an ancestor (parent, parent of parent,…) of the given other DN
it does return false if both DNs are identical
sourcepub fn add_suffix(&self, other: &DistinguishedName) -> DistinguishedName
pub fn add_suffix(&self, other: &DistinguishedName) -> DistinguishedName
add suffix DN to this DN (e.g. the base DN)
sourcepub fn strip_suffix(
&self,
other: &DistinguishedName
) -> Option<DistinguishedName>
pub fn strip_suffix( &self, other: &DistinguishedName ) -> Option<DistinguishedName>
remove a suffix DN from this DN (e.g. the base DN)
Trait Implementations§
source§impl Clone for DistinguishedName
impl Clone for DistinguishedName
source§fn clone(&self) -> DistinguishedName
fn clone(&self) -> DistinguishedName
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for DistinguishedName
impl Debug for DistinguishedName
source§impl<'de> Deserialize<'de> for DistinguishedName
impl<'de> Deserialize<'de> for DistinguishedName
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for DistinguishedName
impl Display for DistinguishedName
source§impl From<DistinguishedName> for String
impl From<DistinguishedName> for String
source§fn from(dn: DistinguishedName) -> Self
fn from(dn: DistinguishedName) -> Self
Converts to this type from the input type.
source§impl FromStr for DistinguishedName
impl FromStr for DistinguishedName
source§impl Hash for DistinguishedName
impl Hash for DistinguishedName
source§impl Ord for DistinguishedName
impl Ord for DistinguishedName
source§impl PartialEq for DistinguishedName
impl PartialEq for DistinguishedName
source§fn eq(&self, other: &DistinguishedName) -> bool
fn eq(&self, other: &DistinguishedName) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for DistinguishedName
impl PartialOrd for DistinguishedName
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for DistinguishedName
impl Serialize for DistinguishedName
source§impl TryFrom<&str> for DistinguishedName
impl TryFrom<&str> for DistinguishedName
source§impl TryFrom<String> for DistinguishedName
impl TryFrom<String> for DistinguishedName
impl Eq for DistinguishedName
impl StructuralEq for DistinguishedName
impl StructuralPartialEq for DistinguishedName
Auto Trait Implementations§
impl RefUnwindSafe for DistinguishedName
impl Send for DistinguishedName
impl Sync for DistinguishedName
impl Unpin for DistinguishedName
impl UnwindSafe for DistinguishedName
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more