mangadex_api_types_rust/
result.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Copy, Serialize, Deserialize, Hash, PartialEq, Eq)]
4#[serde(rename_all = "snake_case")]
5#[cfg_attr(feature = "specta", derive(specta::Type))]
6#[cfg_attr(feature = "async-graphql", derive(async_graphql::Enum))]
7pub enum ResultType {
8 Ok,
9 Error,
10 Ko,
11}
12
13impl Default for ResultType {
14 fn default() -> Self {
15 Self::Ok
16 }
17}
18
19impl ResultType {
20 pub fn ok() -> Self {
21 Self::Ok
22 }
23 pub fn error() -> Self {
24 Self::Error
25 }
26 pub fn ko() -> Self {
27 Self::Ko
28 }
29}