Enum rustc_ap_rustc_span::RealFileName[][src]

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),

Show fields

Fields of Remapped

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.

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 !=.

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

Compare self to key and return true if they are equal.

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.