pub struct Declaration {
pub kind: DeclKind,
pub name: String,
pub full_name: String,
pub binders: Vec<Binder>,
pub ty: TypeExpr,
pub type_surface: String,
pub file: String,
pub line: usize,
pub module: Option<String>,
pub namespace_path: Vec<String>,
pub attributes: Vec<String>,
}Expand description
A parsed declaration ready for indexing / XML export.
Fields§
§kind: DeclKind§name: String§full_name: StringFully qualified-ish name if namespace known: Nat.add_comm.
binders: Vec<Binder>§ty: TypeExpr§type_surface: StringOriginal type surface text (as in source, trimmed).
file: String§line: usize§module: Option<String>§namespace_path: Vec<String>§attributes: Vec<String>Implementations§
Source§impl Declaration
impl Declaration
Sourcepub fn effective_type(&self) -> TypeExpr
pub fn effective_type(&self) -> TypeExpr
Type including explicit binders as Pi/forall-like arrow chain for matching.
Trait Implementations§
Source§impl Clone for Declaration
impl Clone for Declaration
Source§fn clone(&self) -> Declaration
fn clone(&self) -> Declaration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Declaration
impl Debug for Declaration
Source§impl<'de> Deserialize<'de> for Declaration
impl<'de> Deserialize<'de> for Declaration
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 Declaration
Source§impl PartialEq for Declaration
impl PartialEq for Declaration
Source§impl Serialize for Declaration
impl Serialize for Declaration
impl StructuralPartialEq for Declaration
Auto Trait Implementations§
impl Freeze for Declaration
impl RefUnwindSafe for Declaration
impl Send for Declaration
impl Sync for Declaration
impl Unpin for Declaration
impl UnsafeUnpin for Declaration
impl UnwindSafe for Declaration
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