pub struct LDAPSchema {
    pub ldap_syntaxes: Vec<LDAPSyntax>,
    pub matching_rules: Vec<MatchingRule>,
    pub matching_rule_use: Vec<MatchingRuleUse>,
    pub attribute_types: Vec<AttributeType>,
    pub object_classes: Vec<ObjectClass>,
}
Expand description

an entire LDAP schema for an LDAP server

Fields§

§ldap_syntaxes: Vec<LDAPSyntax>

the supported LDAP syntaxes

§matching_rules: Vec<MatchingRule>

the supported LDAP matching rules

§matching_rule_use: Vec<MatchingRuleUse>

the allowed uses (attributes) for the LDAP matching rules

§attribute_types: Vec<AttributeType>

the supported LDAP attribute types

§object_classes: Vec<ObjectClass>

the supported LDAP object classes

Implementations§

source§

impl LDAPSchema

source

pub fn allowed_attributes( &self, id: impl TryInto<KeyStringOrOID> ) -> Option<HashSet<&AttributeType>>

returns the set of allowed attributes (either must or may) for an ObjectClass and all of its super-classes

source

pub fn required_attributes( &self, id: impl TryInto<KeyStringOrOID> ) -> Option<HashSet<&AttributeType>>

returns the set of required attributes (must) for an ObjectClass and all of its super-classes

source

pub fn find_object_class( &self, id: impl TryInto<KeyStringOrOID> ) -> Option<&ObjectClass>

return the object class if it is present in the schema

source

pub fn find_object_class_property<'a, R>( &'a self, id: impl TryInto<KeyStringOrOID>, f: fn(_: &'a ObjectClass) -> Option<&'a R> ) -> Option<&'a R>

apply the given function to the named object class and all its ancestors in the LDAP schema until one returns Some

source

pub fn find_attribute_type( &self, id: impl TryInto<KeyStringOrOID> ) -> Option<&AttributeType>

return the attribute type if it is present in the schema

source

pub fn find_attribute_type_property<'a, R>( &'a self, id: impl TryInto<KeyStringOrOID>, f: fn(_: &'a AttributeType) -> Option<&'a R> ) -> Option<&'a R>

apply the given function to the named attribute type and all its ancestors in the LDAP schema until one returns Some

source

pub fn find_ldap_syntax( &self, id: impl TryInto<ObjectIdentifier> ) -> Option<&LDAPSyntax>

return the ldap syntax if it is present in the schema

source

pub fn find_matching_rule( &self, id: impl TryInto<ObjectIdentifier> ) -> Option<&MatchingRule>

return the matching rule if it is present in the schema

source

pub fn find_matching_rule_use( &self, id: impl TryInto<ObjectIdentifier> ) -> Option<&MatchingRuleUse>

return the matching rule use if it is present in the schema

Trait Implementations§

source§

impl Clone for LDAPSchema

source§

fn clone(&self) -> LDAPSchema

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LDAPSchema

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for LDAPSchema

source§

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 Hash for LDAPSchema

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Serialize for LDAPSchema

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

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> Chain<T> for T

source§

fn len(&self) -> usize

The number of items that this chain link consists of.
source§

fn append_to(self, v: &mut Vec<T>)

Append the elements in this link to the chain.
source§

impl<T> Container<T> for T
where T: Clone,

§

type Iter = Once<T>

An iterator over the items within this container, by value.
source§

fn get_iter(&self) -> <T as Container<T>>::Iter

Iterate over the elements of the container (using internal iteration because GATs are unstable).
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

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

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

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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>,

§

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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> OrderedContainer<T> for T
where T: Clone,