liboxen 0.7.2

Oxen is a fast, unstructured data version control, to help version large machine learning datasets written in Rust.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::{Deserialize, Serialize};

// This are the minimum fields we need to check if an oxen response is valid
#[derive(Serialize, Deserialize, Debug)]
pub struct OxenResponse {
    pub status: String,
    pub status_message: String,
    pub status_description: Option<String>,
}

impl OxenResponse {
    pub fn desc_or_msg(&self) -> String {
        match self.status_description.to_owned() {
            Some(desc) => desc,
            None => self.status_message.to_owned(),
        }
    }
}