INTERNAL: Do not use. A function declaration. For example
fn foo(x: u32) -> u64 {(x + 1).into()}
A function declaration within a trait might not have a body:
trait Trait {
fn bar();
}
Import path
import codeql.rust.elements.internal.generated.RawDirect supertypes
Indirect supertypes
Predicates
| getAbi | Gets the abi of this function, if it exists. |
| getFunctionBody | Gets the function body of this function, if it exists. |
| getGenericParamList | Gets the generic parameter list of this function, if it exists. |
| getName | Gets the name of this function, if it exists. |
| getRetType | Gets the ret type of this function, if it exists. |
| getVisibility | Gets the visibility of this function, if it exists. |
| getWhereClause | Gets the where clause of this function, if it exists. |
| hasImplementation | Holds if this function has an implementation. |
| isAsync | Holds if this function is async. |
| isConst | Holds if this function is const. |
| isDefault | Holds if this function is default. |
| isGen | Holds if this function is gen. |
| isUnsafe | Holds if this function is unsafe. |
| toString |
Inherited predicates
| getAttr | Gets the | from Callable |
| getAttributeMacroExpansion | Gets the attribute macro expansion of this item, if it exists. | from Item |
| getNumberOfAttrs | Gets the number of attrs of this callable. | from Callable |
| getParamList | Gets the parameter list of this callable, if it exists. | from Callable |