Struct darklua_core::nodes::FunctionStatement
source · [−]pub struct FunctionStatement { /* private fields */ }Implementations
sourceimpl FunctionStatement
impl FunctionStatement
pub fn new(
name: FunctionName,
block: Block,
parameters: Vec<Identifier>,
is_variadic: bool
) -> Self
pub fn from_name<S: Into<String>, B: Into<Block>>(name: S, block: B) -> Self
pub fn with_tokens(self, tokens: FunctionStatementTokens) -> Self
pub fn set_tokens(&mut self, tokens: FunctionStatementTokens)
pub fn get_tokens(&self) -> Option<&FunctionStatementTokens>
pub fn with_parameter<S: Into<Identifier>>(self, parameter: S) -> Self
pub fn variadic(self) -> Self
pub fn get_block(&self) -> &Block
pub fn get_name(&self) -> &FunctionName
pub fn parameters_count(&self) -> usize
pub fn get_parameters(&self) -> &Vec<Identifier>
pub fn iter_parameters(&self) -> impl Iterator<Item = &Identifier>
pub fn is_variadic(&self) -> bool
pub fn mutate_block(&mut self) -> &mut Block
pub fn mutate_function_name(&mut self) -> &mut FunctionName
pub fn mutate_parameters(&mut self) -> &mut Vec<Identifier>
pub fn remove_method(&mut self)
pub fn has_parameters(&self) -> bool
pub fn clear_comments(&mut self)
pub fn clear_whitespaces(&mut self)
Trait Implementations
sourceimpl Clone for FunctionStatement
impl Clone for FunctionStatement
sourcefn clone(&self) -> FunctionStatement
fn clone(&self) -> FunctionStatement
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for FunctionStatement
impl Debug for FunctionStatement
sourceimpl From<FunctionStatement> for Statement
impl From<FunctionStatement> for Statement
sourcefn from(function: FunctionStatement) -> Statement
fn from(function: FunctionStatement) -> Statement
Converts to this type from the input type.
sourceimpl PartialEq<FunctionStatement> for FunctionStatement
impl PartialEq<FunctionStatement> for FunctionStatement
sourcefn eq(&self, other: &FunctionStatement) -> bool
fn eq(&self, other: &FunctionStatement) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &FunctionStatement) -> bool
fn ne(&self, other: &FunctionStatement) -> bool
This method tests for !=.
impl Eq for FunctionStatement
impl StructuralEq for FunctionStatement
impl StructuralPartialEq for FunctionStatement
Auto Trait Implementations
impl RefUnwindSafe for FunctionStatement
impl Send for FunctionStatement
impl Sync for FunctionStatement
impl Unpin for FunctionStatement
impl UnwindSafe for FunctionStatement
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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