typed_path/
typed.rs

1/// Implements the body of a function where we map
2/// to the potential path types and call their
3/// underlying function.
4macro_rules! impl_typed_fn {
5    ($self:ident, $f:ident $(, $($tts:tt)*)?) => {
6        match $self {
7            Self::Unix(this) => this.$f($($($tts)*)?),
8            Self::Windows(this) => this.$f($($($tts)*)?),
9        }
10    };
11}
12
13mod non_utf8;
14mod utf8;
15
16pub use non_utf8::*;
17pub use utf8::*;
18
19/// Represents the type of the path.
20pub enum PathType {
21    /// Path is for a Unix platform.
22    Unix,
23
24    /// Path is for a Windows platform.
25    Windows,
26}