diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-14 10:13:57 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-14 10:13:57 +0000 |
commit | d635806ea5090426cd4a5a57601a7f823277e84c (patch) | |
tree | 7e25377045dbabc6063756af9fae72a1af9107a6 /crates/vfs/src/anchored_path.rs | |
parent | 184f4cbf5df909146b05aaa3b7f2f0b27ac36590 (diff) | |
parent | 4b71c8332daf9ef461891d278f2cf3530baaa833 (diff) |
Merge #7257
7257: vfs documentation r=matklad a=arnaudgolfouse
This documents every item in the `vfs` crate, except for a few private, windows-specific items.
Co-authored-by: Arnaud <[email protected]>
Diffstat (limited to 'crates/vfs/src/anchored_path.rs')
-rw-r--r-- | crates/vfs/src/anchored_path.rs | 10 |
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. |
27 | use crate::FileId; | 27 | use 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)] |
30 | pub struct AnchoredPathBuf { | 33 | pub 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)] |
36 | pub struct AnchoredPath<'a> { | 44 | pub 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 | } |