msldap-ext 0.1.0-dev

Encoder/decoder for MS-ADTS LDAP extension controls (Paged Results, ExtendedDN, SDFlags, ShowDeleted, DirSync, VLV). Pure BER — no transport.
Documentation
//! msldap-ext — encoders/decoders for MS-ADTS LDAP extension controls.
//!
//! STATUS: pre-alpha (0.1.0-dev). Skeleton + partial impl. See README.
//!
//! Scope: pure BER control-value codecs. This crate does not open sockets —
//! it produces the byte blobs a caller feeds into `ldap3::Ldap::search_ext`
//! (or any other LDAP transport) as the `controlValue` of an LDAP Control
//! SEQUENCE, and decodes response-side control values back into typed structs.

pub mod ber;
pub mod controls;

pub use controls::dirsync::{
    DirSyncControl, OID_REQUEST as DIRSYNC_OID, OID_RESPONSE as DIRSYNC_RESPONSE_OID,
};
pub use controls::extended_dn::{
    ExtendedDn, ExtendedDnFormat, ExtendedDnRequest, OID as EXTENDED_DN_OID,
};
pub use controls::paged::{PagedResults, OID as PAGED_RESULTS_OID};
pub use controls::sd_flags::{SdFlags, OID as SD_FLAGS_OID};
pub use controls::show_deleted::{ShowDeleted, OID as SHOW_DELETED_OID};
pub use controls::vlv::{VirtualListView, OID as VLV_OID, OID_RESPONSE as VLV_RESPONSE_OID};

use thiserror::Error;

#[derive(Debug, Error, PartialEq, Eq)]
pub enum Error {
    #[error("BER buffer truncated")]
    Truncated,
    #[error("malformed BER/ASN.1: {0}")]
    Malformed(&'static str),
    #[error("feature not implemented in 0.1.0-dev: {0}")]
    Unimplemented(&'static str),
}