Download src/common/model.rs from xcolorday/cror: direct link, hf CLI and curl.
- Browser
- Download file 710 Bytes
-
https://huggingface.co/spaces/xcolorday/cror/resolve/main/src/common/model.rs
- Command line
-
hf download hf://spaces/xcolorday/cror/src/common/model.rs
-
curl -L -o model.rs https://huggingface.co/spaces/xcolorday/cror/resolve/main/src/common/model.rs
710 Bytes
| pub mod config; | |
| pub mod error; | |
| pub mod health; | |
| pub mod token; | |
| pub mod tri; | |
| pub mod userinfo; | |
| use std::borrow::Cow; | |
| use serde::Serialize; | |
| pub enum ApiStatus { | |
| Success, | |
| Error, | |
| } | |
| pub struct GenericError { | |
| // status -> 成功 / 失败 | |
| pub status: ApiStatus, | |
| // HTTP 请求的状态码 | |
| pub code: Option<u16>, | |
| // HTTP 请求的错误码 | |
| pub error: Option<Cow<'static, str>>, | |
| // 错误详情 | |
| pub message: Option<Cow<'static, str>>, | |
| } | |