[][src]Enum cbindgen::RenameRule

pub enum RenameRule {
    None,
    GeckoCase,
    LowerCase,
    UpperCase,
    PascalCase,
    CamelCase,
    SnakeCase,
    ScreamingSnakeCase,
    QualifiedScreamingSnakeCase,
}

A rule to apply to an identifier when generating bindings.

Variants

None

Do not apply any renaming. The default.

GeckoCase

Converts the identifier to PascalCase and adds a context dependent prefix

LowerCase

Converts the identifier to lower case.

UpperCase

Converts the identifier to upper case.

PascalCase

Converts the identifier to PascalCase.

CamelCase

Converts the identifier to camelCase.

SnakeCase

Converts the identifier to snake_case.

ScreamingSnakeCase

Converts the identifier to SCREAMING_SNAKE_CASE.

QualifiedScreamingSnakeCase

Converts the identifier to SCREAMING_SNAKE_CASE and prefixes enum variants with the enum name.

Methods

impl RenameRule[src]

pub fn apply_to_pascal_case(self, text: &str, context: IdentifierType) -> String[src]

Applies the rename rule to a string that is formatted in PascalCase.

pub fn apply_to_snake_case(self, text: &str, context: IdentifierType) -> String[src]

Applies the rename rule to a string that is formatted in snake_case.

Trait Implementations

impl Clone for RenameRule[src]

impl Copy for RenameRule[src]

impl Default for RenameRule[src]

impl Debug for RenameRule[src]

impl FromStr for RenameRule[src]

type Err = String

The associated error which can be returned from parsing.

impl<'de> Deserialize<'de> for RenameRule[src]

Auto Trait Implementations

Blanket Implementations

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 = !

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.

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]