#[non_exhaustive]pub enum NewNameRule {
Fixed,
Regular,
NoPrefix,
Substituted,
}Expand description
Rule that applied to get the NewName.
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.
Fixed
Fixed name to comply to rules. Ex. get_mut_structure -> structure_mut.
Regular
Regular rule: removal of the prefix or replacement with is.
NoPrefix
No prefix for bool getter. Ex. get_has_entry -> has_entry.
Substituted
Applied substitution. Ex. get_mute -> is_muted.
Implementations§
Source§impl NewNameRule
impl NewNameRule
Sourcepub fn is_fixed(&self) -> bool
pub fn is_fixed(&self) -> bool
Returns whether renaming required fixing the name to comply with rules.
Ex. get_mut_structure -> structure_mut.
Sourcepub fn is_substituted(&self) -> bool
pub fn is_substituted(&self) -> bool
Returns whether renaming required substituing (part) of the name.
Ex. get_mute -> is_muted.
Sourcepub fn is_regular(&self) -> bool
pub fn is_regular(&self) -> bool
Returns whether renaming used the regular strategy.
Ex.:
get_name->name.get_active->is_active.
Sourcepub fn is_no_prefix(&self) -> bool
pub fn is_no_prefix(&self) -> bool
Returns whether renaming didn’t use the is prefix for bool getter.
Ex.:
get_has_entry->has_entry.
Trait Implementations§
Source§impl Clone for NewNameRule
impl Clone for NewNameRule
Source§fn clone(&self) -> NewNameRule
fn clone(&self) -> NewNameRule
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 NewNameRule
impl Debug for NewNameRule
Source§impl Display for NewNameRule
impl Display for NewNameRule
Source§impl PartialEq for NewNameRule
impl PartialEq for NewNameRule
impl Copy for NewNameRule
impl StructuralPartialEq for NewNameRule
Auto Trait Implementations§
impl Freeze for NewNameRule
impl RefUnwindSafe for NewNameRule
impl Send for NewNameRule
impl Sync for NewNameRule
impl Unpin for NewNameRule
impl UnwindSafe for NewNameRule
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