pub struct ResourceLocation {
pub filesystem: Filesystem,
pub path: PathBuf,
}Expand description
One resolved path on one filesystem namespace. Always resolved: an
unresolved user entry (a ~ home query) is a
crate::addr::RemoteLocation, never a ResourceLocation.
Fields§
§filesystem: Filesystem§path: PathBufImplementations§
Source§impl ResourceLocation
impl ResourceLocation
pub fn local(path: PathBuf) -> Self
pub fn remote(endpoint: RemoteEndpoint, path: PathBuf) -> Self
Sourcepub fn label(&self) -> String
pub fn label(&self) -> String
Modeline/trace form: the bare path locally, endpoint + path
for a remote resource — never an ambiguous local-looking path.
Sourcepub fn local_path(&self) -> Option<&Path>
pub fn local_path(&self) -> Option<&Path>
The local path, only when this resource is on the local disk. There is no other way to read the path as a local one.
Trait Implementations§
Source§impl Clone for ResourceLocation
impl Clone for ResourceLocation
Source§fn clone(&self) -> ResourceLocation
fn clone(&self) -> ResourceLocation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceLocation
impl Debug for ResourceLocation
Source§impl<'de> Deserialize<'de> for ResourceLocation
impl<'de> Deserialize<'de> for ResourceLocation
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
impl Eq for ResourceLocation
Source§impl Hash for ResourceLocation
impl Hash for ResourceLocation
Source§impl PartialEq for ResourceLocation
impl PartialEq for ResourceLocation
Source§impl Serialize for ResourceLocation
impl Serialize for ResourceLocation
impl StructuralPartialEq for ResourceLocation
Auto Trait Implementations§
impl Freeze for ResourceLocation
impl RefUnwindSafe for ResourceLocation
impl Send for ResourceLocation
impl Sync for ResourceLocation
impl Unpin for ResourceLocation
impl UnsafeUnpin for ResourceLocation
impl UnwindSafe for ResourceLocation
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