Struct ldap3::result::CompareResult
[−]
[src]
pub struct CompareResult(pub LdapResult);
Wraper 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.
Methods
impl CompareResult
[src]
fn equal(self) -> Result<bool, Error>
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 io::Error
.
fn non_error(self) -> Result<LdapResult, Error>
If the result code is 5 (compareFalse), 6 (compareTrue), or 10 (referral), return
the inner LdapResult
, otherwise rewrap LdapResult
in an io::Error
.
Trait Implementations
impl Clone for CompareResult
[src]
fn clone(&self) -> CompareResult
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more