Document vfs public items

This commit is contained in:
Arnaud 2021-01-12 17:22:57 +01:00
parent 52fa926f00
commit 311ec70d03
5 changed files with 204 additions and 2 deletions

View file

@ -26,14 +26,24 @@
//! from the anchor than.
use crate::FileId;
/// Path relative to a file.
///
/// Owned version of [`AnchoredPath`].
#[derive(Clone, PartialEq, Eq, Debug)]
pub struct AnchoredPathBuf {
/// File that this path is relative to.
pub anchor: FileId,
/// Path relative to `anchor`'s containing directory.
pub path: String,
}
/// Path relative to a file.
///
/// Borrowed version of [`AnchoredPathBuf`].
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub struct AnchoredPath<'a> {
/// File that this path is relative to.
pub anchor: FileId,
/// Path relative to `anchor`'s containing directory.
pub path: &'a str,
}