mangadex_api_input_types/
lib.rs1use std::path::Path;
2
3pub mod api_client;
4pub mod at_home;
5pub mod author;
6pub mod captcha;
7pub mod chapter;
8pub mod cover;
9pub mod custom_list;
10pub mod feed;
11pub mod follows;
12pub mod forums;
13pub mod legacy;
14pub mod manga;
15pub mod oauth;
16pub mod rating;
17pub mod read_marker;
18pub mod report;
19pub mod scanlation_group;
20pub mod settings;
21pub mod statistics;
22pub mod upload;
23pub mod user;
24
25#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, serde::Serialize, serde::Deserialize)]
26#[cfg_attr(feature = "specta", derive(specta::Type))]
27pub struct PathBuf(std::path::PathBuf);
28
29impl From<std::path::PathBuf> for PathBuf {
30 fn from(value: std::path::PathBuf) -> Self {
31 Self(value)
32 }
33}
34
35impl From<PathBuf> for std::path::PathBuf {
36 fn from(value: PathBuf) -> Self {
37 value.0
38 }
39}
40impl AsRef<Path> for PathBuf {
41 fn as_ref(&self) -> &Path {
42 &self.0
43 }
44}
45
46#[cfg(feature = "async-graphql")]
47async_graphql::scalar!(PathBuf);