Skip to main content

msldap_ext/
lib.rs

1//! msldap-ext — encoders/decoders for MS-ADTS LDAP extension controls.
2//!
3//! STATUS: pre-alpha (0.1.0-dev). Skeleton + partial impl. See README.
4//!
5//! Scope: pure BER control-value codecs. This crate does not open sockets —
6//! it produces the byte blobs a caller feeds into `ldap3::Ldap::search_ext`
7//! (or any other LDAP transport) as the `controlValue` of an LDAP Control
8//! SEQUENCE, and decodes response-side control values back into typed structs.
9
10pub mod ber;
11pub mod controls;
12
13pub use controls::dirsync::{
14    DirSyncControl, OID_REQUEST as DIRSYNC_OID, OID_RESPONSE as DIRSYNC_RESPONSE_OID,
15};
16pub use controls::extended_dn::{
17    ExtendedDn, ExtendedDnFormat, ExtendedDnRequest, OID as EXTENDED_DN_OID,
18};
19pub use controls::paged::{PagedResults, OID as PAGED_RESULTS_OID};
20pub use controls::sd_flags::{SdFlags, OID as SD_FLAGS_OID};
21pub use controls::show_deleted::{ShowDeleted, OID as SHOW_DELETED_OID};
22pub use controls::vlv::{VirtualListView, OID as VLV_OID, OID_RESPONSE as VLV_RESPONSE_OID};
23
24use thiserror::Error;
25
26#[derive(Debug, Error, PartialEq, Eq)]
27pub enum Error {
28    #[error("BER buffer truncated")]
29    Truncated,
30    #[error("malformed BER/ASN.1: {0}")]
31    Malformed(&'static str),
32    #[error("feature not implemented in 0.1.0-dev: {0}")]
33    Unimplemented(&'static str),
34}