sway_ast/item/
item_fn.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::priv_prelude::*;

#[derive(Clone, Debug, Serialize)]
pub struct ItemFn {
    pub fn_signature: FnSignature,
    pub body: Braces<CodeBlockContents>,
}

impl Spanned for ItemFn {
    fn span(&self) -> Span {
        Span::join(self.fn_signature.span(), &self.body.span())
    }
}