pub enum RealFileName {
    LocalPath(PathBuf),
    Remapped {
        local_path: Option<PathBuf>,
        virtual_name: PathBuf,
    },
}

Variants§

§

LocalPath(PathBuf)

§

Remapped

Fields

§local_path: Option<PathBuf>

local_path is the (host-dependent) local path to the file. This is None if the file was imported from another crate

§virtual_name: PathBuf

virtual_name is the stable path rustc will store internally within build artifacts.

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§

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.

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.

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.

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.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.

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: 24 bytes
  • Remapped: 48 bytes