[−][src]Struct ldap3::SearchEntry
Parsed search result entry.
While LDAP attributes can have a variety of syntaxes, they're all returned in search results as octet strings, without any associated type information. A general-purpose result parser could leave all values in that format, but then retrieving them from user code would be cumbersome and tedious.
For that reason, the parser tries to convert every value into a String
. If an
attribute can contain unconstrained binary strings, the conversion may fail. In that case,
the attribute and all its values will be in the bin_attrs
hashmap. Since it's
possible that a particular set of values for a binary attribute could be
converted into UTF-8 String
s, the presence of of such attribute in the result
entry should be checked for both in attrs
and bin_atrrs
.
Fields
dn: String
Entry DN.
attrs: HashMap<String, Vec<String>>
Attributes.
bin_attrs: HashMap<String, Vec<Vec<u8>>>
Binary-valued attributes.
Implementations
impl SearchEntry
[src]
pub fn construct(re: ResultEntry) -> SearchEntry
[src]
Parse raw BER data and convert it into attribute map(s).
Note: this function will panic on parsing error.
Trait Implementations
impl Clone for SearchEntry
[src]
pub fn clone(&self) -> SearchEntry
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SearchEntry
[src]
Auto Trait Implementations
impl RefUnwindSafe for SearchEntry
[src]
impl Send for SearchEntry
[src]
impl Sync for SearchEntry
[src]
impl Unpin for SearchEntry
[src]
impl UnwindSafe for SearchEntry
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,