1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
use http::StatusCode; use crate::body::IngestBody; use crate::error::HttpError; /// A response from the LogDNA Ingest API #[derive(Debug, PartialEq)] pub enum Response<T: AsRef<IngestBody>> { Sent, // contains the failed body, a status code and a reason the request failed(String) Failed(T, StatusCode, String), } /// Type alias for a response from `Client::send` pub type IngestResponse<T> = Result<Response<T>, HttpError<T>>;