nym-statistics-common 1.20.4

This crate contains basic statistics utilities and abstractions to be re-used and applied throughout both the client and gateway implementations
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2024 - Nym Technologies SA <contact@nymtech.net>
// SPDX-License-Identifier: Apache-2.0

use thiserror::Error;

/// Error types occurring while processing statistics events and reporting.
#[derive(Debug, Error)]
#[allow(missing_docs)]
pub enum StatsError {
    #[error("Failed to (de)serialize stats report : {0}")]
    ReportJsonSerialization(#[from] serde_json::Error),
}

/// Result of a statistics operation.
pub type Result<T> = core::result::Result<T, StatsError>;