pub enum RealFileName {
LocalPath(PathBuf),
Remapped {
local_path: Option<PathBuf>,
virtual_name: PathBuf,
},
}
Variants§
LocalPath(PathBuf)
Remapped
For remapped paths (namely paths into libstd that have been mapped
to the appropriate spot on the local host’s file system, and local file
system paths that have been remapped with FilePathMapping
),
Implementations§
Source§impl RealFileName
impl RealFileName
Sourcepub fn local_path(&self) -> Option<&Path>
pub fn local_path(&self) -> Option<&Path>
Returns the path suitable for reading from the file system on the local host,
if this information exists.
Avoid embedding this in build artifacts; see remapped_path_if_available()
for that.
Sourcepub fn into_local_path(self) -> Option<PathBuf>
pub fn into_local_path(self) -> Option<PathBuf>
Returns the path suitable for reading from the file system on the local host,
if this information exists.
Avoid embedding this in build artifacts; see remapped_path_if_available()
for that.
Sourcepub fn remapped_path_if_available(&self) -> &Path
pub fn remapped_path_if_available(&self) -> &Path
Returns the path suitable for embedding into build artifacts. This would still
be a local path if it has not been remapped. A remapped path will not correspond
to a valid file system path: see local_path_if_available()
for something that
is more likely to return paths into the local host file system.
Sourcepub fn local_path_if_available(&self) -> &Path
pub fn local_path_if_available(&self) -> &Path
Returns the path suitable for reading from the file system on the local host,
if this information exists. Otherwise returns the remapped name.
Avoid embedding this in build artifacts; see remapped_path_if_available()
for that.
Sourcepub fn to_path(&self, display_pref: FileNameDisplayPreference) -> &Path
pub fn to_path(&self, display_pref: FileNameDisplayPreference) -> &Path
Return the path remapped or not depending on the FileNameDisplayPreference
.
For the purpose of this function, local and short preference are equal.
pub fn to_string_lossy( &self, display_pref: FileNameDisplayPreference, ) -> Cow<'_, str>
Trait Implementations§
Source§impl Clone for RealFileName
impl Clone for RealFileName
Source§fn clone(&self) -> RealFileName
fn clone(&self) -> RealFileName
Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for RealFileName
impl Debug for RealFileName
Source§impl<__D: SpanDecoder> Decodable<__D> for RealFileName
impl<__D: SpanDecoder> Decodable<__D> for RealFileName
Source§impl Hash for RealFileName
impl Hash for RealFileName
Source§impl Ord for RealFileName
impl Ord for RealFileName
Source§impl PartialEq for RealFileName
impl PartialEq for RealFileName
Source§impl PartialOrd for RealFileName
impl PartialOrd for RealFileName
impl Eq for RealFileName
impl StructuralPartialEq for RealFileName
Auto Trait Implementations§
impl DynSend for RealFileName
impl DynSync for RealFileName
impl Freeze for RealFileName
impl RefUnwindSafe for RealFileName
impl Send for RealFileName
impl Sync for RealFileName
impl Unpin for RealFileName
impl UnwindSafe for RealFileName
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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§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
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 48 bytes
Size for each variant:
LocalPath
: 32 bytesRemapped
: 48 bytes