Struct FileId
pub struct FileId(pub u32);Expand description
A file identifier used to track which source file a span belongs to.
File IDs are indices into a file table maintained by the compiler.
FileId(0) is reserved as the default/unknown file.
Tuple Fields§
§0: u32Implementations§
§impl FileId
impl FileId
pub const DEFAULT: FileId
pub const DEFAULT: FileId
The default file ID, used for single-file compilation or when the file is unknown.
pub const PRELUDE: FileId
pub const PRELUDE: FileId
File ID reserved for the synthetic compiler prelude (ADR-0065). Always parsed first; used so the prelude has a stable FileId distinct from any user file.
Trait Implementations§
§impl<'de> Deserialize<'de> for FileId
impl<'de> Deserialize<'de> for FileId
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<FileId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<FileId, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for FileId
impl Serialize for FileId
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for FileId
impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more