braintrust-sdk-rust 0.1.0-alpha.1

Rust SDK for Braintrust logging and tracing
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

#[derive(Debug, Error)]
pub enum BraintrustError {
    #[error("invalid configuration: {0}")]
    InvalidConfig(String),
    #[error("http error: {0}")]
    Http(#[from] reqwest::Error),
    #[error("internal channel closed")]
    ChannelClosed,
    #[error("background task failed: {0}")]
    Background(String),
    #[error("stream aggregation error: {0}")]
    StreamAggregation(String),
}

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