pub trait HirDisplay {
// Required method
fn hir_fmt(&self, f: &mut HirFormatter<'_>) -> Result<(), SignatureError>;
// Provided methods
fn get_signature(&self, f: &mut HirFormatter<'_>) -> Option<String> { ... }
fn get_signature_with_links(
&self,
f: &mut HirFormatter<'_>,
) -> (Option<String>, Vec<LocationLink>) { ... }
}
Required Methods§
Sourcefn hir_fmt(&self, f: &mut HirFormatter<'_>) -> Result<(), SignatureError>
fn hir_fmt(&self, f: &mut HirFormatter<'_>) -> Result<(), SignatureError>
Formats signature.
Provided Methods§
Sourcefn get_signature(&self, f: &mut HirFormatter<'_>) -> Option<String>
fn get_signature(&self, f: &mut HirFormatter<'_>) -> Option<String>
Gets the signature of an item (i.e., item without its body).
Sourcefn get_signature_with_links(
&self,
f: &mut HirFormatter<'_>,
) -> (Option<String>, Vec<LocationLink>)
fn get_signature_with_links( &self, f: &mut HirFormatter<'_>, ) -> (Option<String>, Vec<LocationLink>)
Gets the signature of an item and a list of LocationLink
s to enable mapping
signature slices on documentable items.