Struct fix_getters_rules::new_name::NewName[][src]

#[non_exhaustive]
pub struct NewName { /* fields omitted */ }
Expand description

Would-be-getter rename attempt sucessful result and details.

Holds details about what happened and assumptions on the return type.

Implementations

impl NewName[src]

pub fn as_str(&self) -> &str[src]

Returns the new name.

pub fn unwrap(self) -> String[src]

Consumes the NewName and returns the inner new name String.

pub fn returns_bool(&self) -> ReturnsBool[src]

Returns current knowledge about the getter returning exactly one bool.

pub fn rule(&self) -> NewNameRule[src]

Returns the renaming rule that was used to rename the getter.

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 Debug for NewName[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Display for NewName[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl PartialEq<NewName> for NewName[src]

fn eq(&self, other: &NewName) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &NewName) -> bool[src]

This method tests for !=.

impl<T: AsRef<str>> PartialEq<T> for NewName[src]

fn eq(&self, other: &T) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl StructuralPartialEq for NewName[src]

Auto Trait Implementations

impl RefUnwindSafe for NewName

impl Send for NewName

impl Sync for NewName

impl Unpin for NewName

impl UnwindSafe for NewName

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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

pub default fn to_string(&self) -> String[src]

Converts the given value to a String. Read more

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.