Struct ldap3::result::LdapResult
source · pub struct LdapResult {
pub rc: u32,
pub matched: String,
pub text: String,
pub refs: Vec<String>,
pub ctrls: Vec<Control>,
}
Expand description
Common components of an LDAP operation result.
This structure faithfully replicates the components dictated by the standard,
and is distinctly C-like with its reliance on numeric codes for the indication
of outcome. It would be tempting to hide it behind an automatic Result
-like
interface, but there are scenarios where this would preclude intentional
incorporation of error conditions into query design. Instead, the struct
implements helper methods, success()
and
non_error()
, which may be used for ergonomic error
handling when simple condition checking suffices.
Fields§
§rc: u32
Result code.
Generally, the value of zero indicates successful completion, but there’s a number of other non-error codes arising as a result of various operations. See Section A.1 of RFC 4511.
matched: String
Matched component DN, where applicable.
text: String
Additional diagnostic text.
refs: Vec<String>
Referrals.
Absence of referrals is represented by an empty vector.
ctrls: Vec<Control>
Response controls.
Missing and empty controls are both represented by an empty vector.
Implementations§
Trait Implementations§
source§impl Clone for LdapResult
impl Clone for LdapResult
source§fn clone(&self) -> LdapResult
fn clone(&self) -> LdapResult
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more