[][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 Copy for RenameRule[src]

impl Default for RenameRule[src]

impl Clone for RenameRule[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

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

impl Send for RenameRule

impl Sync for RenameRule

Blanket Implementations

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]

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