mqtt-client-wasm 0.2.2

MQTT v3.1.1/v5.0 client for browsers using WebSocket (ws/wss) transport, compiled to WebAssembly
Documentation
//! Error types for the MQTT client

use thiserror::Error;

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

#[derive(Error, Debug)]
pub enum Error {
    #[error("WebSocket connection error: {0}")]
    WebSocketError(String),

    #[error("MQTT protocol error: {0}")]
    ProtocolError(String),

    #[error("Connection closed")]
    ConnectionClosed,

    #[error("Connection not established")]
    NotConnected,

    #[error("Invalid packet format")]
    InvalidPacket,

    #[error("Buffer overflow")]
    BufferOverflow,

    #[error("IO error: {0}")]
    Io(String),

    #[error("Other error: {0}")]
    Other(String),
}

// Removed ewebsock dependency