areev 0.1.1

Rust SDK for the Areev knowledge database — gRPC and HTTP transports
Documentation
/// Errors returned by the Areev client.
#[derive(Debug, thiserror::Error)]
pub enum AreevError {
    #[error("HTTP error: {0}")]
    #[cfg(feature = "http")]
    Http(#[from] reqwest::Error),

    #[error("gRPC error: {0}")]
    #[cfg(feature = "grpc")]
    Grpc(#[from] tonic::Status),

    #[error("serialization error: {0}")]
    Serialization(#[from] serde_json::Error),

    #[error("API error ({status}): {message}")]
    Api { status: u16, message: String },
}

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