ms-tds 0.1.0-dev

Pure-Rust TDS 7.4 client for Microsoft SQL Server — PreLogin, TLS-in-TDS handshake tunneling, Login7 with NTLM SSPI, SQLBatch — with offensive primitives (xp_cmdshell, xp_dirtree UNC coerce, linked-server enum).
Documentation
use thiserror::Error;

#[derive(Debug, Error)]
pub enum Error {
    #[error("io: {0}")]
    Io(#[from] std::io::Error),
    #[error("ntlm: {0}")]
    Ntlm(#[from] ntlmssp::NtlmError),
    #[error("protocol: {0}")]
    Protocol(&'static str),
    #[error("short read: expected {expected}, got {got}")]
    ShortRead { expected: usize, got: usize },
    #[error("invalid packet type: {0:#x}")]
    InvalidPacketType(u8),
    #[error("server error {code}: {message}")]
    Server { code: u32, message: String },
    #[error("tls: {0}")]
    Tls(String),
    #[error("unsupported: {0}")]
    Unsupported(&'static str),
}

pub type Result<T> = std::result::Result<T, Error>;