Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ default = [
"mio-uds",
"num_cpus",
"pin-project-lite",
"serde-support",
]
docs = ["attributes", "unstable"]
unstable = ["default", "broadcaster"]
attributes = ["async-attributes"]
serde-support = [
"serde",
]
std = [
"async-macros",
"crossbeam-utils",
Expand Down Expand Up @@ -70,6 +74,7 @@ once_cell = { version = "1.2.0", optional = true }
pin-project-lite = { version = "0.1", optional = true }
pin-utils = { version = "0.1.0-alpha.4", optional = true }
slab = { version = "0.4.2", optional = true }
serde = { version = "1.0.0", optional = true, features = ["derive"] }

[dev-dependencies]
femme = "1.2.0"
Expand Down
4 changes: 4 additions & 0 deletions src/path/pathbuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ use crate::path::Path;
use crate::prelude::*;
#[cfg(feature = "unstable")]
use crate::stream::{self, FromStream, IntoStream};
#[cfg(feature = "serde-support")]
use serde::{Serialize, Deserialize};

/// This struct is an async version of [`std::path::PathBuf`].
///
/// [`std::path::Path`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html
#[cfg_attr(feature = "serde-support", derive(Serialize, Deserialize))]
#[derive(Clone, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct PathBuf {
#[cfg_attr(feature = "serde-support", serde(flatten))]
inner: std::path::PathBuf,
}

Expand Down