#[non_exhaustive]pub enum IdentificationMode {
Conservative,
AllGetFunctions,
}
Expand description
Mode to be used for getter identification.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Conservative
Apply conservative rules:
- The function is a method. This excludes standalone functions or associated functions.
- The function accepts no arguments besides
&['_][mut] self
. The methods which accept other arguments are notgetter
s in the sense that they usually don’t return current value of a field and renaming them would harm the semantic. Functions consumingself
were also considered not eligible for renaming. - The function accepts no type parameter (lifetimes are accepted). The reason is the same as for functions accepting multiple arguments (see above).
AllGetFunctions
Apply name rules to all function with the get
prefix.
Implementations§
Source§impl IdentificationMode
impl IdentificationMode
pub fn is_conservative(self) -> bool
Trait Implementations§
Source§impl Clone for IdentificationMode
impl Clone for IdentificationMode
Source§fn clone(&self) -> IdentificationMode
fn clone(&self) -> IdentificationMode
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 IdentificationMode
impl Debug for IdentificationMode
Source§impl PartialEq for IdentificationMode
impl PartialEq for IdentificationMode
impl Copy for IdentificationMode
impl StructuralPartialEq for IdentificationMode
Auto Trait Implementations§
impl Freeze for IdentificationMode
impl RefUnwindSafe for IdentificationMode
impl Send for IdentificationMode
impl Sync for IdentificationMode
impl Unpin for IdentificationMode
impl UnwindSafe for IdentificationMode
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