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: LdapResultImplementations§
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 duplicate 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 Freeze for SearchResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more