1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use crate::{flavours::*, EndsWith, Path, PathFlavour};

impl EndsWith<Absolute> for Path<Absolute> {}

impl EndsWith<Relative> for Path<Absolute> {}

impl EndsWith<Unknown> for Path<Absolute> {}

impl EndsWith<Relative> for Path<Relative> {}

impl EndsWith<Unknown> for Path<Relative> {}

impl EndsWith<Absolute> for Path<Unknown> {}

impl EndsWith<Relative> for Path<Unknown> {}

impl EndsWith<Unknown> for Path<Unknown> {}

impl<BF: PathFlavour> Path<BF> {
    pub fn ends_with<OF: PathFlavour>(&self, other: &Path<OF>) -> bool
    where
        Path<BF>: EndsWith<OF>,
    {
        self.ends_with_internal(other)
    }
}