pub struct ExportUsage {
pub path: PathBuf,
pub export_name: String,
pub line: u32,
pub col: u32,
pub reference_count: usize,
pub reference_locations: Vec<ReferenceLocation>,
}Expand description
Usage count for an export symbol. Used by the LSP Code Lens to show the number of importing files above each export declaration.
Fields§
§path: PathBufFile containing the export.
export_name: StringName of the exported symbol.
line: u321-based line number.
col: u320-based byte column offset.
reference_count: usizeNumber of distinct files that import this export. Two imports in one file count as one file.
reference_locations: Vec<ReferenceLocation>Import sites that reference this export, one entry per physical import.
A file with two imports gives two entries, so this list can be longer
than reference_count. An import without a source span has no entry.
Used by the LSP Code Lens to enable click-to-navigate via
editor.action.showReferences.
Trait Implementations§
Source§impl Clone for ExportUsage
impl Clone for ExportUsage
Source§impl Debug for ExportUsage
impl Debug for ExportUsage
Source§impl<'de> Deserialize<'de> for ExportUsage
impl<'de> Deserialize<'de> for ExportUsage
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
Auto Trait Implementations§
impl Freeze for ExportUsage
impl RefUnwindSafe for ExportUsage
impl Send for ExportUsage
impl Sync for ExportUsage
impl Unpin for ExportUsage
impl UnsafeUnpin for ExportUsage
impl UnwindSafe for ExportUsage
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