standard_lib/fs/path/
error.rs1use derive_more::{Display, Error, From};
2
3use crate::fs::error::{EmptyStrError, ExcessiveLinksError, HomeResolutionError, MissingComponentError, NoSearchError, NonDirComponentError, PathLengthError};
4use crate::fs::file::MetadataError;
5
6#[derive(Debug, Display, Clone, From, Error)]
7pub enum PathError {
8 NoSearch(NoSearchError),
9 ExcessiveLinks(ExcessiveLinksError),
10 PathLength(PathLengthError),
11 MissingComponent(MissingComponentError),
12 NonDirComponent(NonDirComponentError),
13}
14
15#[derive(Debug, Display, Clone, From, Error)]
16pub enum PathOrMetadataError {
18 Path(PathError),
19 Metadata(MetadataError),
20}
21
22
23#[derive(Debug, Display, Clone, From, Error)]
24pub enum PathParseError {
25 EmptyStr(EmptyStrError),
26 HomeResolution(HomeResolutionError),
27}