Enum ident_case::RenameRule[][src]

pub enum RenameRule {
    None,
    LowerCase,
    PascalCase,
    CamelCase,
    SnakeCase,
    ScreamingSnakeCase,
    KebabCase,
}

A casing rule for renaming Rust identifiers.

Variants

None

No-op rename rule.

LowerCase

Rename direct children to “lowercase” style.

PascalCase

Rename direct children to “PascalCase” style, as typically used for enum variants.

CamelCase

Rename direct children to “camelCase” style.

SnakeCase

Rename direct children to “snake_case” style, as commonly used for fields.

ScreamingSnakeCase

Rename direct children to “SCREAMING_SNAKE_CASE” style, as commonly used for constants.

KebabCase

Rename direct children to “kebab-case” style.

Implementations

impl RenameRule[src]

pub fn apply_to_variant<S: AsRef<str>>(&self, variant: S) -> String[src]

Change case of a PascalCase variant.

pub fn apply_to_field<S: AsRef<str>>(&self, field: S) -> String[src]

Change case of a snake_case field.

Trait Implementations

impl Clone for RenameRule[src]

impl Debug for RenameRule[src]

impl Default for RenameRule[src]

impl FromStr for RenameRule[src]

type Err = ()

The associated error which can be returned from parsing.

impl PartialEq<RenameRule> for RenameRule[src]

impl Copy for RenameRule[src]

impl Eq for RenameRule[src]

impl StructuralEq for RenameRule[src]

impl StructuralPartialEq for RenameRule[src]

Auto Trait Implementations

impl RefUnwindSafe for RenameRule

impl Send for RenameRule

impl Sync for RenameRule

impl Unpin for RenameRule

impl UnwindSafe for RenameRule

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, 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.