Enum cbindgen::RenameRule
[−]
[src]
pub enum RenameRule { None, GeckoCase, LowerCase, UpperCase, PascalCase, CamelCase, SnakeCase, ScreamingSnakeCase, }
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 prefix based on where the identifier is used.
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.
Methods
impl RenameRule
[src]
fn apply_to_pascal_case(&self, text: &str, context: IdentifierType) -> String
Applies the rename rule to a string that is formatted in PascalCase.
fn apply_to_snake_case(&self, text: &str, context: IdentifierType) -> String
Applies the rename rule to a string that is formatted in snake_case.
Trait Implementations
impl Debug for RenameRule
[src]
impl Clone for RenameRule
[src]
fn clone(&self) -> RenameRule
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for RenameRule
[src]
impl Default for RenameRule
[src]
fn default() -> RenameRule
Returns the "default value" for a type. Read more
impl FromStr for RenameRule
[src]
type Err = String
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<RenameRule, Self::Err>
Parses a string s
to return a value of this type. Read more
impl Deserialize for RenameRule
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer,
D: Deserializer,
Deserialize this value from the given Serde deserializer. Read more