aboutsummaryrefslogtreecommitdiff
path: root/crates/vfs/src/anchored_path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/vfs/src/anchored_path.rs')
-rw-r--r--crates/vfs/src/anchored_path.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/crates/vfs/src/anchored_path.rs b/crates/vfs/src/anchored_path.rs
index 02720a32e..db15a2a21 100644
--- a/crates/vfs/src/anchored_path.rs
+++ b/crates/vfs/src/anchored_path.rs
@@ -26,14 +26,24 @@
26//! from the anchor than. 26//! from the anchor than.
27use crate::FileId; 27use crate::FileId;
28 28
29/// Path relative to a file.
30///
31/// Owned version of [`AnchoredPath`].
29#[derive(Clone, PartialEq, Eq, Debug)] 32#[derive(Clone, PartialEq, Eq, Debug)]
30pub struct AnchoredPathBuf { 33pub struct AnchoredPathBuf {
34 /// File that this path is relative to.
31 pub anchor: FileId, 35 pub anchor: FileId,
36 /// Path relative to `anchor`'s containing directory.
32 pub path: String, 37 pub path: String,
33} 38}
34 39
40/// Path relative to a file.
41///
42/// Borrowed version of [`AnchoredPathBuf`].
35#[derive(Clone, Copy, PartialEq, Eq, Debug)] 43#[derive(Clone, Copy, PartialEq, Eq, Debug)]
36pub struct AnchoredPath<'a> { 44pub struct AnchoredPath<'a> {
45 /// File that this path is relative to.
37 pub anchor: FileId, 46 pub anchor: FileId,
47 /// Path relative to `anchor`'s containing directory.
38 pub path: &'a str, 48 pub path: &'a str,
39} 49}