smb-server 0.12.1

SMB2/3 file-sharing server library with pluggable storage backends.
Documentation
//! Error type for the SMB protocol layer.

use thiserror::Error;

pub type ProtoResult<T> = Result<T, ProtoError>;

#[derive(Debug, Error)]
pub enum ProtoError {
    #[error("malformed wire frame: {0}")]
    Malformed(&'static str),

    #[error("unsupported dialect: 0x{0:04x}")]
    UnsupportedDialect(u16),

    #[error("auth failure: {0}")]
    Auth(&'static str),

    #[error("crypto failure: {0}")]
    Crypto(&'static str),

    #[error("io error: {0}")]
    Io(#[from] std::io::Error),

    #[error("binrw error: {0}")]
    Binrw(#[from] binrw::Error),
}