Struct ldap_types::schema::LDAPSchema
source · 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
impl LDAPSchema
sourcepub fn allowed_attributes(
&self,
id: impl TryInto<KeyStringOrOID>
) -> Option<HashSet<&AttributeType>>
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
sourcepub fn required_attributes(
&self,
id: impl TryInto<KeyStringOrOID>
) -> Option<HashSet<&AttributeType>>
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
sourcepub fn find_object_class(
&self,
id: impl TryInto<KeyStringOrOID>
) -> Option<&ObjectClass>
pub fn find_object_class( &self, id: impl TryInto<KeyStringOrOID> ) -> Option<&ObjectClass>
return the object class if it is present in the schema
sourcepub fn find_object_class_property<'a, R>(
&'a self,
id: impl TryInto<KeyStringOrOID>,
f: fn(_: &'a ObjectClass) -> Option<&'a R>
) -> Option<&'a R>
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
sourcepub fn find_attribute_type(
&self,
id: impl TryInto<KeyStringOrOID>
) -> Option<&AttributeType>
pub fn find_attribute_type( &self, id: impl TryInto<KeyStringOrOID> ) -> Option<&AttributeType>
return the attribute type if it is present in the schema
sourcepub fn find_attribute_type_property<'a, R>(
&'a self,
id: impl TryInto<KeyStringOrOID>,
f: fn(_: &'a AttributeType) -> Option<&'a R>
) -> Option<&'a R>
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
sourcepub fn find_ldap_syntax(
&self,
id: impl TryInto<ObjectIdentifier>
) -> Option<&LDAPSyntax>
pub fn find_ldap_syntax( &self, id: impl TryInto<ObjectIdentifier> ) -> Option<&LDAPSyntax>
return the ldap syntax if it is present in the schema
sourcepub fn find_matching_rule(
&self,
id: impl TryInto<ObjectIdentifier>
) -> Option<&MatchingRule>
pub fn find_matching_rule( &self, id: impl TryInto<ObjectIdentifier> ) -> Option<&MatchingRule>
return the matching rule if it is present in the schema
sourcepub fn find_matching_rule_use(
&self,
id: impl TryInto<ObjectIdentifier>
) -> Option<&MatchingRuleUse>
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
impl Clone for LDAPSchema
source§fn clone(&self) -> LDAPSchema
fn clone(&self) -> LDAPSchema
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more