pub struct FileId(/* private fields */);Expand description
An opaque handle to one interned source file.
FileIds are only ever minted by SourceMap::intern; they are pure
identity tokens and must never be constructed by hand. The field is private,
which keeps the construction surface closed across crate boundaries.
Implementations§
Source§impl FileId
impl FileId
Sourcepub const SYNTHETIC: FileId
pub const SYNTHETIC: FileId
The synthetic file id used for diagnostics that are not tied to any real
source location (for example a CLI usage error). It sits at the top of
the id space: SourceMap::intern mints from 0 upward and panics
rather than reach it.
pub const fn to_u32(self) -> u32
Trait Implementations§
impl Copy for FileId
impl Eq for FileId
Source§impl Ord for FileId
impl Ord for FileId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for FileId
impl PartialOrd for FileId
impl StructuralPartialEq for FileId
Auto Trait Implementations§
impl Freeze for FileId
impl RefUnwindSafe for FileId
impl Send for FileId
impl Sync for FileId
impl Unpin for FileId
impl UnsafeUnpin for FileId
impl UnwindSafe for FileId
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