pub struct Function { /* private fields */ }
Implementations§
source§impl Function
impl Function
pub fn module(self, db: &dyn HirDatabase) -> Module
sourcepub fn full_name(self, db: &dyn HirDatabase) -> String
pub fn full_name(self, db: &dyn HirDatabase) -> String
Returns the full name of the function including all module specifiers (e.g: foo::bar
).
pub fn file_id(self, db: &dyn HirDatabase) -> FileId
pub fn name(self, db: &dyn HirDatabase) -> Name
pub fn data(self, db: &dyn DefDatabase) -> Arc<FunctionData>
pub fn body(self, db: &dyn HirDatabase) -> Arc<Body>
pub fn ty(self, db: &dyn HirDatabase) -> Ty
pub fn ret_type(self, db: &dyn HirDatabase) -> Ty
pub fn infer(self, db: &dyn HirDatabase) -> Arc<InferenceResult>
pub fn is_extern(self, db: &dyn HirDatabase) -> bool
pub fn diagnostics(self, db: &dyn HirDatabase, sink: &mut DiagnosticSink<'_>)
Trait Implementations§
source§impl From<Function> for CallableDef
impl From<Function> for CallableDef
source§fn from(it: Function) -> CallableDef
fn from(it: Function) -> CallableDef
Converts to this type from the input type.
source§impl HasVisibility for Function
impl HasVisibility for Function
fn visibility(&self, db: &dyn HirDatabase) -> Visibility
source§impl Ord for Function
impl Ord for Function
source§impl PartialOrd<Function> for Function
impl PartialOrd<Function> for Function
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Function
impl Eq for Function
impl StructuralEq for Function
impl StructuralPartialEq for Function
Auto Trait Implementations§
impl RefUnwindSafe for Function
impl Send for Function
impl Sync for Function
impl Unpin for Function
impl UnwindSafe for Function
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.