pub struct FunctionDeclaration {
pub decorators: Vec<Decorator>,
pub is_declare: bool,
pub name: String,
pub type_params: Vec<TypeParameter>,
pub params: Vec<FunctionParam>,
pub return_type: Option<TypeAnnotation>,
pub body: Vec<Statement>,
pub span: Range<usize>,
}Expand description
Represents a function declaration.
Fields§
§decorators: Vec<Decorator>Decorators associated with the declaration.
is_declare: boolWhether the declaration is declared with declare.
name: StringThe name of the function.
type_params: Vec<TypeParameter>Type parameters of the function.
params: Vec<FunctionParam>Parameters of the function.
return_type: Option<TypeAnnotation>Return type of the function.
body: Vec<Statement>Body of the function.
span: Range<usize>Source span of the declaration.
Trait Implementations§
Source§impl Clone for FunctionDeclaration
impl Clone for FunctionDeclaration
Source§fn clone(&self) -> FunctionDeclaration
fn clone(&self) -> FunctionDeclaration
Returns a duplicate 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 FunctionDeclaration
impl Debug for FunctionDeclaration
Source§impl<'de> Deserialize<'de> for FunctionDeclaration
impl<'de> Deserialize<'de> for FunctionDeclaration
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FunctionDeclaration
impl RefUnwindSafe for FunctionDeclaration
impl Send for FunctionDeclaration
impl Sync for FunctionDeclaration
impl Unpin for FunctionDeclaration
impl UnsafeUnpin for FunctionDeclaration
impl UnwindSafe for FunctionDeclaration
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