Struct debris_hir::hir_nodes::HirFunction
source · pub struct HirFunction {
pub span: Span,
pub signature_span: Span,
pub parameter_span: Span,
pub is_comptime: bool,
pub attributes: Vec<Attribute>,
pub ident: HirFunctionName,
pub block: HirBlock,
pub parameters: Vec<HirParameterDeclaration>,
pub return_type: Option<HirTypePattern>,
}
Expand description
A function, which contains other statements
Fields§
§span: Span
§signature_span: Span
§parameter_span: Span
§is_comptime: bool
§attributes: Vec<Attribute>
§ident: HirFunctionName
§block: HirBlock
The block containing all statements of the function
parameters: Vec<HirParameterDeclaration>
§return_type: Option<HirTypePattern>
Implementations§
source§impl HirFunction
impl HirFunction
pub fn return_type_span(&self) -> Span
Trait Implementations§
source§impl Debug for HirFunction
impl Debug for HirFunction
source§impl PartialEq for HirFunction
impl PartialEq for HirFunction
source§fn eq(&self, other: &HirFunction) -> bool
fn eq(&self, other: &HirFunction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for HirFunction
impl StructuralEq for HirFunction
impl StructuralPartialEq for HirFunction
Auto Trait Implementations§
impl RefUnwindSafe for HirFunction
impl !Send for HirFunction
impl !Sync for HirFunction
impl Unpin for HirFunction
impl UnwindSafe for HirFunction
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
§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.