#[non_exhaustive]pub enum ParsePodPathError {
NotAPodPath,
ForbiddenCharacter,
DotSegment,
EmptySegment,
NotAContainer,
}Expand description
The reasons a path can fail to be a PodPath.
is_not_a_pod_path splits them into the two
answers a gate gives: a path outside the allow-list (404) and a pod path
with a forbidden shape (400). Match on that method rather than on the
variants, so that a variant added later is classified by this crate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotAPodPath
The path is outside the allow-list: it is not /pods/ followed by a
valid 64-digit lowercase hex key and then / or exactly .acl.
ForbiddenCharacter
The path holds a character outside A–Z a–z 0–9 - . _ ~ /.
DotSegment
A segment of the path is . or ...
EmptySegment
A segment of the path is empty (//), other than after a single
trailing /.
NotAContainer
PodPath::join was called on a path that is not a container.
Implementations§
Source§impl ParsePodPathError
impl ParsePodPathError
Sourcepub fn is_not_a_pod_path(&self) -> bool
pub fn is_not_a_pod_path(&self) -> bool
Returns true when the path is outside the allow-list altogether
(a gate answers 404) and false when it is a pod path of a forbidden
shape (a gate answers 400).
Trait Implementations§
Source§impl Clone for ParsePodPathError
impl Clone for ParsePodPathError
impl Copy for ParsePodPathError
Source§impl Debug for ParsePodPathError
impl Debug for ParsePodPathError
Source§impl Display for ParsePodPathError
impl Display for ParsePodPathError
impl Eq for ParsePodPathError
Source§impl Error for ParsePodPathError
impl Error for ParsePodPathError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()