path_type

Macro path_type 

Source
macro_rules! path_type {
    ($(#[doc = $doc:literal])* $(#[non_exhaustive($($non_exhaustive:tt)+)])? $name:ident) => { ... };
    ($(#[$($attr:tt)+])* $name:ident: dir) => { ... };
    ($(#[$($attr:tt)+])* $name:ident: file) => { ... };
}
Expand description

Declares a new strongly-typed path newtype.

path_type! {
    /// optional docs
    // optional. if false, makes the type's constructor public.
    #[non_exhaustive(any())]
    FooPath: dir // or file. adds extra utility methods for manipulating the file/dir
}