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
sourceimpl 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
sourceimpl Clone for DistinguishedName
impl Clone for DistinguishedName
sourcefn clone(&self) -> DistinguishedName
fn clone(&self) -> DistinguishedName
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for DistinguishedName
impl Debug for DistinguishedName
sourceimpl<'de> Deserialize<'de> for DistinguishedName
impl<'de> Deserialize<'de> for DistinguishedName
sourcefn 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
sourceimpl Display for DistinguishedName
impl Display for DistinguishedName
sourceimpl From<DistinguishedName> for String
impl From<DistinguishedName> for String
sourcefn from(dn: DistinguishedName) -> Self
fn from(dn: DistinguishedName) -> Self
Converts to this type from the input type.
sourceimpl FromStr for DistinguishedName
impl FromStr for DistinguishedName
sourceimpl Hash for DistinguishedName
impl Hash for DistinguishedName
sourceimpl Ord for DistinguishedName
impl Ord for DistinguishedName
1.21.0 · sourceconst fn max(self, other: Self) -> Self
const fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourceconst fn min(self, other: Self) -> Self
const fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourceconst fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
const fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<DistinguishedName> for DistinguishedName
impl PartialEq<DistinguishedName> for DistinguishedName
sourcefn eq(&self, other: &DistinguishedName) -> bool
fn eq(&self, other: &DistinguishedName) -> bool
sourceimpl PartialOrd<DistinguishedName> for DistinguishedName
impl PartialOrd<DistinguishedName> for DistinguishedName
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const 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 moresourceimpl Serialize for DistinguishedName
impl Serialize for DistinguishedName
sourceimpl TryFrom<&str> for DistinguishedName
impl TryFrom<&str> for DistinguishedName
sourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more