pub struct ProjectionFile(/* private fields */);Expand description
The file of a projection, kept as written in configuration.
A file that starts with / is a root file: it resolves from the
workspace root. Any other file resolves below the release-unit path.
The text is private, so that ProjectionFile::workspace_path is the
only way to turn it into a path. No caller joins a release-unit path and
a projection file by hand. That matters for a root file: joining /x
onto any path gives the filesystem root, outside the workspace.
Implementations§
Source§impl ProjectionFile
impl ProjectionFile
Sourcepub fn unit_relative(path: &Path) -> Self
pub fn unit_relative(path: &Path) -> Self
A file relative to the release-unit path.
Sourcepub fn workspace_path(&self, unit_path: &Path) -> PathBuf
pub fn workspace_path(&self, unit_path: &Path) -> PathBuf
Workspace-relative path of this file for a release unit at unit_path.
Trait Implementations§
Source§impl Clone for ProjectionFile
impl Clone for ProjectionFile
Source§impl Debug for ProjectionFile
impl Debug for ProjectionFile
Source§impl<'de> Deserialize<'de> for ProjectionFile
impl<'de> Deserialize<'de> for ProjectionFile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ProjectionFile
impl Display for ProjectionFile
impl Eq for ProjectionFile
Source§impl PartialEq for ProjectionFile
impl PartialEq for ProjectionFile
Source§impl PartialEq<&str> for ProjectionFile
impl PartialEq<&str> for ProjectionFile
Auto Trait Implementations§
impl Freeze for ProjectionFile
impl RefUnwindSafe for ProjectionFile
impl Send for ProjectionFile
impl Sync for ProjectionFile
impl Unpin for ProjectionFile
impl UnsafeUnpin for ProjectionFile
impl UnwindSafe for ProjectionFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.