Enum fix_getters_rules::new_name::NewNameRule[][src]

#[non_exhaustive]pub enum NewNameRule {
    Fixed,
    Regular,
    NoPrefix,
    Substituted,
}

Rule that applied to get the NewName.

Variants (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

impl NewNameRule[src]

pub fn is_fixed(&self) -> bool[src]

Returns whether renaming required fixing the name to comply with rules.

Ex. get_mut_structure -> structure_mut.

pub fn is_substituted(&self) -> bool[src]

Returns whether renaming required substituing (part) of the name.

Ex. get_mute -> is_muted.

pub fn is_regular(&self) -> bool[src]

Returns whether renaming used the regular strategy.

Ex.:

  • get_name -> name.
  • get_active -> is_active.

pub fn is_no_prefix(&self) -> bool[src]

Returns whether renaming didn’t use the is prefix for bool getter.

Ex.:

  • get_has_entry -> has_entry.

Trait Implementations

impl Clone for NewNameRule[src]

impl Copy for NewNameRule[src]

impl Debug for NewNameRule[src]

impl Display for NewNameRule[src]

impl PartialEq<NewNameRule> for NewNameRule[src]

impl StructuralPartialEq for NewNameRule[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.