Enum fix_getters_rules::new_name::NewNameRule [−][src]
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 name to comply to rules. Ex. get_mut_structure
-> structure_mut
.
Regular rule: removal of the prefix or replacement with is
.
No prefix for bool
getter. Ex. get_has_entry
-> has_entry
.
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]
fn clone(&self) -> NewNameRule
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for NewNameRule
[src]
impl Debug for NewNameRule
[src]
impl Display for NewNameRule
[src]
impl PartialEq<NewNameRule> for NewNameRule
[src]
fn eq(&self, other: &NewNameRule) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for NewNameRule
[src]
Auto Trait Implementations
impl RefUnwindSafe for NewNameRule
impl Send for NewNameRule
impl Sync for NewNameRule
impl Unpin for NewNameRule
impl UnwindSafe for NewNameRule
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,