zenops-safe-relative-path 0.5.0

Relative path type that statically prevents `..` traversal.
Documentation
1
2
3
4
5
6
7
#[derive(Debug, thiserror::Error, PartialEq)]
pub enum Error {
    #[error("The specified relative path {0:?} goes outside of the parent directory")]
    PathGoesOutsideParent(relative_path::RelativePathBuf),
    #[error("{0:?} is not a single path component")]
    NotASinglePathComponent(String),
}