[][src]Struct proc_macro::SourceFile

pub struct SourceFile { /* fields omitted */ }
🔬 This is a nightly-only experimental API. (proc_macro_span #54725)

The source file of a given Span.

Methods

impl SourceFile
[src]

🔬 This is a nightly-only experimental API. (proc_macro_span #54725)

Get the path to this source file.

Note

If the code span associated with this SourceFile was generated by an external macro, this macro, this may not be an actual path on the filesystem. Use is_real to check.

Also note that even if is_real returns true, if --remap-path-prefix was passed on the command line, the path as given may not actually be valid.

🔬 This is a nightly-only experimental API. (proc_macro_span #54725)

Returns true if this source file is a real source file, and not generated by an external macro's expansion.

Trait Implementations

impl Clone for SourceFile
[src]

Performs copy-assignment from source. Read more

impl !Sync for SourceFile
[src]

impl Eq for SourceFile
[src]

impl PartialEq<SourceFile> for SourceFile
[src]

This method tests for !=.

impl !Send for SourceFile
[src]

impl Debug for SourceFile
[src]

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from #33417)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from #33417)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<E> SpecializationError for E
[src]

impl<T> Erased for T
[src]

impl<T> Send for T where
    T: ?Sized
[src]

impl<T> Sync for T where
    T: ?Sized
[src]

impl<T> Erased for T