pub struct LocalFunction {
pub attributes: Vec<Attribute>,
pub local_keyword: Token,
pub function_keyword: Token,
pub function_name: 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
A struct representing a local function.
Fields§
§attributes: Vec<Attribute>Attributes before the function.
local_keyword: TokenThe local keyword.
function_keyword: TokenThe function keyword.
function_name: TokenThe name of the function.
generics: Option<Pointer<GenericDeclaration>>The generics of the function.
parameters: BracketedList<Parameter>The parameters that this function accepts.
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 Clone for LocalFunction
impl Clone for LocalFunction
Source§fn clone(&self) -> LocalFunction
fn clone(&self) -> LocalFunction
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LocalFunction
impl Debug for LocalFunction
Source§impl GetRange for LocalFunction
impl GetRange for LocalFunction
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 Hash for LocalFunction
impl Hash for LocalFunction
Source§impl Ord for LocalFunction
impl Ord for LocalFunction
Source§fn cmp(&self, other: &LocalFunction) -> Ordering
fn cmp(&self, other: &LocalFunction) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl Parse for LocalFunction
impl Parse for LocalFunction
Source§impl PartialEq for LocalFunction
impl PartialEq for LocalFunction
Source§impl PartialOrd for LocalFunction
impl PartialOrd for LocalFunction
Source§impl Print for LocalFunction
impl Print for LocalFunction
impl Eq for LocalFunction
impl StructuralPartialEq for LocalFunction
Auto Trait Implementations§
impl Freeze for LocalFunction
impl RefUnwindSafe for LocalFunction
impl !Send for LocalFunction
impl !Sync for LocalFunction
impl Unpin for LocalFunction
impl UnwindSafe for LocalFunction
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