pub struct AddFunctionMutation {
pub parent: SymbolId,
pub name: String,
pub params: Vec<(String, String)>,
pub return_type: Option<String>,
pub body: String,
pub is_pub: bool,
}Expand description
Add a new function to the file
Fields§
§parent: SymbolIdParent module SymbolId
name: String§params: Vec<(String, String)>§return_type: Option<String>§body: String§is_pub: boolImplementations§
Trait Implementations§
Source§impl Clone for AddFunctionMutation
impl Clone for AddFunctionMutation
Source§fn clone(&self) -> AddFunctionMutation
fn clone(&self) -> AddFunctionMutation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AddFunctionMutation
impl Debug for AddFunctionMutation
Source§impl Mutation for AddFunctionMutation
impl Mutation for AddFunctionMutation
Source§fn validate(&self, file: &PureFile) -> ValidationResult
fn validate(&self, file: &PureFile) -> ValidationResult
Validate the mutation before applying Read more
Source§fn mutation_type(&self) -> &'static str
fn mutation_type(&self) -> &'static str
Get the mutation type name
Source§fn can_proceed(&self, file: &PureFile, strategy: ValidationStrategy) -> bool
fn can_proceed(&self, file: &PureFile, strategy: ValidationStrategy) -> bool
Check if this mutation can proceed with the given strategy
Source§impl ToSerializable for AddFunctionMutation
impl ToSerializable for AddFunctionMutation
fn to_serializable(&self) -> SerializableMutation
Auto Trait Implementations§
impl Freeze for AddFunctionMutation
impl RefUnwindSafe for AddFunctionMutation
impl Send for AddFunctionMutation
impl Sync for AddFunctionMutation
impl Unpin for AddFunctionMutation
impl UnsafeUnpin for AddFunctionMutation
impl UnwindSafe for AddFunctionMutation
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