pub struct Func<'a> {
pub keyword: Slice<'a>,
pub id: Option<Ident<'a>>,
pub open_paren: Slice<'a>,
pub params: Vec<ListEntry<'a, FuncArg<'a>>>,
pub close_paren: Slice<'a>,
pub body: FuncBody<'a>,
pub star: Option<Slice<'a>>,
pub keyword_async: Option<Slice<'a>>,
}
Expand description
A function, this will be part of either a function declaration (ID is required) or a function expression (ID is optional)
//function declaration
function thing() {}
//function expressions
var x = function() {}
let y = function q() {}
Fields
keyword: Slice<'a>
id: Option<Ident<'a>>
open_paren: Slice<'a>
params: Vec<ListEntry<'a, FuncArg<'a>>>
close_paren: Slice<'a>
body: FuncBody<'a>
star: Option<Slice<'a>>
keyword_async: Option<Slice<'a>>
Implementations
Trait Implementations
sourceimpl<'a> PartialEq<Func<'a>> for Func<'a>
impl<'a> PartialEq<Func<'a>> for Func<'a>
impl<'a> StructuralPartialEq for Func<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Func<'a>
impl<'a> Send for Func<'a>
impl<'a> Sync for Func<'a>
impl<'a> Unpin for Func<'a>
impl<'a> UnwindSafe for Func<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more