pub struct FunctionDef<'a> {Show 14 fields
pub name: Name<'a>,
pub type_parameters: Option<TypeParameters<'a>>,
pub params: Parameters<'a>,
pub body: Suite<'a>,
pub decorators: Vec<Decorator<'a>>,
pub returns: Option<Annotation<'a>>,
pub asynchronous: Option<Asynchronous<'a>>,
pub leading_lines: Vec<EmptyLine<'a>>,
pub lines_after_decorators: Vec<EmptyLine<'a>>,
pub whitespace_after_def: SimpleWhitespace<'a>,
pub whitespace_after_name: SimpleWhitespace<'a>,
pub whitespace_after_type_parameters: SimpleWhitespace<'a>,
pub whitespace_before_params: ParenthesizableWhitespace<'a>,
pub whitespace_before_colon: SimpleWhitespace<'a>,
}
Fields§
§name: Name<'a>
§type_parameters: Option<TypeParameters<'a>>
§params: Parameters<'a>
§body: Suite<'a>
§decorators: Vec<Decorator<'a>>
§returns: Option<Annotation<'a>>
§asynchronous: Option<Asynchronous<'a>>
§leading_lines: Vec<EmptyLine<'a>>
§lines_after_decorators: Vec<EmptyLine<'a>>
§whitespace_after_def: SimpleWhitespace<'a>
§whitespace_after_name: SimpleWhitespace<'a>
§whitespace_after_type_parameters: SimpleWhitespace<'a>
§whitespace_before_params: ParenthesizableWhitespace<'a>
§whitespace_before_colon: SimpleWhitespace<'a>
Trait Implementations§
Source§impl<'a> Clone for FunctionDef<'a>
impl<'a> Clone for FunctionDef<'a>
Source§fn clone(&self) -> FunctionDef<'a>
fn clone(&self) -> FunctionDef<'a>
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<'a> Codegen<'a> for FunctionDef<'a>
impl<'a> Codegen<'a> for FunctionDef<'a>
fn codegen(&self, state: &mut CodegenState<'a>)
Source§impl<'a> Debug for FunctionDef<'a>
impl<'a> Debug for FunctionDef<'a>
Source§impl<'a> PartialEq for FunctionDef<'a>
impl<'a> PartialEq for FunctionDef<'a>
impl<'a> Eq for FunctionDef<'a>
impl<'a> StructuralPartialEq for FunctionDef<'a>
Auto Trait Implementations§
impl<'a> Freeze for FunctionDef<'a>
impl<'a> RefUnwindSafe for FunctionDef<'a>
impl<'a> Send for FunctionDef<'a>
impl<'a> Sync for FunctionDef<'a>
impl<'a> Unpin for FunctionDef<'a>
impl<'a> UnwindSafe for FunctionDef<'a>
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