[][src]Struct ldap3::LdapUrlParams

pub struct LdapUrlParams<'a> {
    pub base: Cow<'a, str>,
    pub attrs: Vec<&'a str>,
    pub scope: Scope,
    pub filter: Cow<'a, str>,
    pub extensions: HashSet<LdapUrlExt<'a>>,
}

Parameters of an LDAP URL.

The LDAP URL specification describes a number of optional URL parameters, contained in the query part, which mostly provide Search operation settings. Additionally, the URL can have a list of extensions, describing further options.

When populating the extensions set, extension value is ignored in hashing and comparisons, meaning that only a single extension instance can be recognized. Searching the set for a value-bearing variant should be done with an empty value:

let url = Url::parse("ldapi://%2fvar%2frun%2fldapi/????1.3.6.1.4.1.10094.1.5.2=EXTERNAL")?;
let params = get_url_params(&url)?;
let mech = match params.extensions.get(&LdapUrlExt::SaslMech("".into())) {
    Some(&LdapUrlExt::SaslMech(ref val)) => val.as_ref(),
    _ => "",
};
assert_eq!(mech, "EXTERNAL");

Fields

base: Cow<'a, str>

Search base, percent-decoded.

attrs: Vec<&'a str>

Attribute list, returned as * (all attributes) if missing.

scope: Scope

Search scope, returned as Scope::Subtree if missing.

filter: Cow<'a, str>

Filter string, percent-decoded.

extensions: HashSet<LdapUrlExt<'a>>

Extensions, whose values are percent-decoded.

Trait Implementations

impl<'a> Clone for LdapUrlParams<'a>[src]

impl<'a> Debug for LdapUrlParams<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for LdapUrlParams<'a>[src]

impl<'a> Send for LdapUrlParams<'a>[src]

impl<'a> Sync for LdapUrlParams<'a>[src]

impl<'a> Unpin for LdapUrlParams<'a>[src]

impl<'a> UnwindSafe for LdapUrlParams<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.