pub struct FactCard {
pub span: (u32, u32),
pub name: String,
pub is_def: bool,
pub exported: bool,
pub def_site: Option<(String, (u32, u32))>,
pub problem: Option<String>,
pub ty: Option<String>,
pub ns: Option<String>,
}Expand description
Everything the engine knows about the name at an offset, in one record. No transport, no markdown — the editor renders it.
Fields§
§span: (u32, u32)The name’s own byte span in its document.
name: String§is_def: boolTrue at a definition site (else it is a reference).
exported: bool§def_site: Option<(String, (u32, u32))>Where navigation lands: (uri, byte span) — for a def, itself.
problem: Option<String>“cannot find …”, “… is not exported”, when unresolved.
ty: Option<String>Display type, already rendered as the engine wants it shown.
ns: Option<String>Which of the language’s namespaces this name lives in, when it has more than one and this is not the default. (C, for example, puts struct tags and goto labels in namespaces of their own.)
Trait Implementations§
impl Eq for FactCard
impl StructuralPartialEq for FactCard
Auto Trait Implementations§
impl Freeze for FactCard
impl RefUnwindSafe for FactCard
impl Send for FactCard
impl Sync for FactCard
impl Unpin for FactCard
impl UnsafeUnpin for FactCard
impl UnwindSafe for FactCard
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