pub struct CompareResult(pub LdapResult);
Expand description
Wrapper for the result of a Compare operation.
Compare uniquely has two non-zero return codes to indicate the outcome of a successful
comparison, while other return codes indicate errors, as usual (except 10 for referral).
The equal()
method optimizes for the expected case of ignoring
referrals; non_error()
can be used when that’s not possible.
Tuple Fields§
§0: LdapResult
Implementations§
Source§impl CompareResult
impl CompareResult
Sourcepub fn equal(self) -> Result<bool>
pub fn equal(self) -> Result<bool>
If the result code is 5 (compareFalse) or 6 (compareTrue), return the corresponding
boolean value wrapped in Ok()
, otherwise wrap the LdapResult
part in an LdapError
.
Sourcepub fn non_error(self) -> Result<LdapResult>
pub fn non_error(self) -> Result<LdapResult>
If the result code is 5 (compareFalse), 6 (compareTrue), or 10 (referral), return
the inner LdapResult
, otherwise rewrap LdapResult
in an LdapError
.
Trait Implementations§
Source§impl Clone for CompareResult
impl Clone for CompareResult
Source§fn clone(&self) -> CompareResult
fn clone(&self) -> CompareResult
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 Freeze for CompareResult
impl RefUnwindSafe for CompareResult
impl Send for CompareResult
impl Sync for CompareResult
impl Unpin for CompareResult
impl UnwindSafe for CompareResult
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