use thiserror::Error;
pub type Result<T> = core::result::Result<T, Error>;
#[derive(Debug, Error)]
pub enum Error {
#[error("LSA API {api} failed: NTSTATUS 0x{status:08x}")]
Lsa { api: &'static str, status: u32 },
#[error("Kerberos package returned protocol error: NTSTATUS 0x{0:08x}")]
Protocol(u32),
#[error("response buffer malformed: {0}")]
Malformed(&'static str),
#[error("string too long for UNICODE_STRING")]
StringTooLong,
#[error("buffer arithmetic overflow")]
Overflow,
#[error("windows-lsa is only functional on Windows")]
Unsupported,
}