pub struct FileId(pub u32);Expand description
Index into a Sources registry, identifying the file a
Span points at.
User/script modules occupy the low ids (the registry stores their text).
The prelude and each stdlib package own a fixed reserved id near
u32::MAX; these have no source text and are not stored in the registry —
the diagnostic renderer maps them to a virtual path via reserved_path.
Tuple Fields§
§0: u32Implementations§
Source§impl FileId
impl FileId
pub const FIRST_RESERVED: u32
pub const COMPILER: FileId
pub const PRELUDE: FileId
pub const FS: FileId
pub const HTTP: FileId
pub const URL: FileId
pub const UUID: FileId
pub const CRYPTO: FileId
pub const SECURITY: FileId
pub const MATH: FileId
pub const JSON: FileId
pub const TEMPORAL: FileId
pub const MCP: FileId
pub const NUMBER: FileId
pub const STRING: FileId
pub const REGEX: FileId
pub const URI: FileId
pub const SECRETS: FileId
pub const TEST: FileId
pub const SESSION: FileId
pub const LLM: FileId
pub const EMBEDDING: FileId
pub const CODE: FileId
pub const GIT: FileId
pub const AGENTS: FileId
pub const SKILLS: FileId
Sourcepub fn reserved_path(self) -> Option<&'static str>
pub fn reserved_path(self) -> Option<&'static str>
Virtual display path for a reserved (prelude/stdlib) id, e.g.
submilli:fs. Returns None for ordinary user/script files, which
instead resolve to a SourceFile in the registry.
Trait Implementations§
impl Copy for FileId
Source§impl<'de> Deserialize<'de> for FileId
impl<'de> Deserialize<'de> for FileId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.