Struct ldap3::result::SearchResult
source · pub struct SearchResult(pub Vec<ResultEntry>, pub LdapResult);
Expand description
Wrapper for results of a Search operation which returns all entries at once.
The wrapper exists so that methods success()
and
non_error()
can be called on an instance. Those methods
destructure the wrapper and return its components as elements of an anonymous
tuple.
Tuple Fields§
§0: Vec<ResultEntry>
§1: LdapResult
Implementations§
source§impl SearchResult
impl SearchResult
sourcepub fn success(self) -> Result<(Vec<ResultEntry>, LdapResult)>
pub fn success(self) -> Result<(Vec<ResultEntry>, LdapResult)>
If the result code is zero, return an anonymous tuple of component structs
wrapped in Ok()
, otherwise wrap the LdapResult
part in an LdapError
.
sourcepub fn non_error(self) -> Result<(Vec<ResultEntry>, LdapResult)>
pub fn non_error(self) -> Result<(Vec<ResultEntry>, LdapResult)>
If the result code is 0 or 10 (referral), return an anonymous tuple of component
structs wrapped in Ok()
, otherwise wrap the LdapResult
part in an LdapError
.
Trait Implementations§
source§impl Clone for SearchResult
impl Clone for SearchResult
source§fn clone(&self) -> SearchResult
fn clone(&self) -> SearchResult
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for SearchResult
impl Send for SearchResult
impl Sync for SearchResult
impl Unpin for SearchResult
impl UnwindSafe for SearchResult
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more