Enum cbindgen::RenameRule [−][src]
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]
impl RenameRule
pub fn apply_to_pascal_case(
&self,
text: &str,
context: IdentifierType
) -> String
[src]
pub fn apply_to_pascal_case(
&self,
text: &str,
context: IdentifierType
) -> String
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]
pub 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 Debug for RenameRule
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for RenameRule
[src]
impl Clone for RenameRule
fn clone(&self) -> RenameRule
[src]
fn clone(&self) -> RenameRule
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for RenameRule
[src]
impl Copy for RenameRule
impl Default for RenameRule
[src]
impl Default for RenameRule
fn default() -> RenameRule
[src]
fn default() -> RenameRule
Returns the "default value" for a type. Read more
impl FromStr for RenameRule
[src]
impl FromStr for RenameRule
type Err = String
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<RenameRule, Self::Err>
[src]
fn from_str(s: &str) -> Result<RenameRule, Self::Err>
Parses a string s
to return a value of this type. Read more
impl<'de> Deserialize<'de> for RenameRule
[src]
impl<'de> Deserialize<'de> for RenameRule
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl Send for RenameRule
impl Send for RenameRule
impl Sync for RenameRule
impl Sync for RenameRule