better_path/
ends_with.rs

1use crate::{flavours::*, EndsWith, Path, PathFlavour};
2
3impl EndsWith<Absolute> for Path<Absolute> {}
4
5impl EndsWith<Relative> for Path<Absolute> {}
6
7impl EndsWith<Unknown> for Path<Absolute> {}
8
9impl EndsWith<Relative> for Path<Relative> {}
10
11impl EndsWith<Unknown> for Path<Relative> {}
12
13impl EndsWith<Absolute> for Path<Unknown> {}
14
15impl EndsWith<Relative> for Path<Unknown> {}
16
17impl EndsWith<Unknown> for Path<Unknown> {}
18
19impl<BF: PathFlavour> Path<BF> {
20    pub fn ends_with<OF: PathFlavour>(&self, other: &Path<OF>) -> bool
21    where
22        Path<BF>: EndsWith<OF>,
23    {
24        self.ends_with_internal(other)
25    }
26}