[][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.

Implementations

impl RenameRule[src]

pub fn apply(self, text: &str, context: IdentifierType<'_>) -> String[src]

Applies the rename rule to a string

Trait Implementations

impl Clone for RenameRule[src]

impl Copy for RenameRule[src]

impl Debug for RenameRule[src]

impl Default for RenameRule[src]

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

impl FromStr for RenameRule[src]

type Err = String

The associated error which can be returned from parsing.

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,