pub enum Location {
Native(PathBuf),
Virtual(VirtualRoot, VPath),
}Expand description
Where something lives. Native targets give paths; the web gives virtual roots, and so does a native process that has no home directory, whose storage then lasts only as long as the process.
Variants§
Native(PathBuf)
Virtual(VirtualRoot, VPath)
Implementations§
Source§impl Location
impl Location
Sourcepub fn native_path(&self) -> Result<&Path, Unsupported>
pub fn native_path(&self) -> Result<&Path, Unsupported>
The operating-system path, for code that must hand one to a native API; portable code opens locations through the platform’s file layer instead.
§Errors
Unsupported for a virtual location, which has no path.
pub fn join(&self, relative: &VPath) -> Self
Trait Implementations§
impl Eq for Location
impl StructuralPartialEq for Location
Auto Trait Implementations§
impl Forget for Location
impl Freeze for Location
impl Move for Location
impl RefUnwindSafe for Location
impl Send for Location
impl Sync for Location
impl Unpin for Location
impl UnsafeUnpin for Location
impl UnwindSafe for Location
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