pub struct IndexedFile {
pub relative_path: String,
pub language: LanguageId,
pub classification: FileClassification,
pub content: Vec<u8>,
pub symbols: Vec<SymbolRecord>,
pub parse_status: ParseStatus,
pub parse_diagnostic: Option<ParseDiagnostic>,
pub byte_len: u64,
pub content_hash: String,
pub references: Vec<ReferenceRecord>,
pub alias_map: HashMap<String, String>,
pub mtime_secs: u64,
}Expand description
A single indexed file — all data needed for query and display.
Fields§
§relative_path: String§language: LanguageId§classification: FileClassification§content: Vec<u8>Raw file bytes stored in memory (LIDX-03 — zero disk I/O on read path).
symbols: Vec<SymbolRecord>Symbols extracted by the parser.
parse_status: ParseStatus§parse_diagnostic: Option<ParseDiagnostic>§byte_len: u64§content_hash: String§references: Vec<ReferenceRecord>Cross-references extracted by xref::extract_references (Phase 4).
alias_map: HashMap<String, String>Import alias map for this file: alias -> original name.
mtime_secs: u64Unix timestamp (seconds) of the file’s mtime when it was last indexed. Used by the freshness guard to detect files that changed on disk after indexing. Zero means mtime was not recorded (indexed before this field was added).
Implementations§
Source§impl IndexedFile
impl IndexedFile
pub fn from_parse_result(result: FileProcessingResult, content: Vec<u8>) -> Self
Sourcepub fn with_mtime(self, mtime_secs: u64) -> Self
pub fn with_mtime(self, mtime_secs: u64) -> Self
Set the mtime recorded at index time. Call after from_parse_result for
callers that have the file metadata available.
Trait Implementations§
Source§impl AsRef<IndexedFile> for IndexedFile
impl AsRef<IndexedFile> for IndexedFile
Source§fn as_ref(&self) -> &IndexedFile
fn as_ref(&self) -> &IndexedFile
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for IndexedFile
impl Clone for IndexedFile
Source§fn clone(&self) -> IndexedFile
fn clone(&self) -> IndexedFile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for IndexedFile
impl RefUnwindSafe for IndexedFile
impl Send for IndexedFile
impl Sync for IndexedFile
impl Unpin for IndexedFile
impl UnsafeUnpin for IndexedFile
impl UnwindSafe for IndexedFile
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more