pub struct Closure {
pub attributes: Vec<Attribute>,
pub function_keyword: Token,
pub generics: Option<Pointer<GenericDeclaration>>,
pub parameters: BracketedList<Parameter>,
pub colon: Option<Pointer<Token>>,
pub return_type: Option<Pointer<TypeValue>>,
pub body: Block,
pub end_keyword: Token,
}Expand description
All possible arguments that can be passed to a function.
Fields§
§attributes: Vec<Attribute>Attributes before the function.
function_keyword: TokenThe function keyword at the start
generics: Option<Pointer<GenericDeclaration>>The generics of this function.
parameters: BracketedList<Parameter>All parameters of the function.
colon: Option<Pointer<Token>>The : character between closing parenthesis and returns.
return_type: Option<Pointer<TypeValue>>The return type of the function
body: BlockThe body of the function.
end_keyword: TokenThe end keyword.
Trait Implementations§
Source§impl GetRange for Closure
impl GetRange for Closure
Source§fn get_range(&self) -> Result<Range, GetRangeError>
fn get_range(&self) -> Result<Range, GetRangeError>
Get the range of the node. This will only fail if
Cst.status is
AstStatus::HasErrors.Source§impl Ord for Closure
impl Ord for Closure
Source§impl PartialOrd for Closure
impl PartialOrd for Closure
impl Eq for Closure
impl StructuralPartialEq for Closure
Auto Trait Implementations§
impl Freeze for Closure
impl RefUnwindSafe for Closure
impl !Send for Closure
impl !Sync for Closure
impl Unpin for Closure
impl UnwindSafe for Closure
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