[−][src]Enum cbindgen::RenameRule
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]
&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]
Applies the rename rule to a string that is formatted in snake_case.
Trait Implementations
impl Copy for RenameRule
[src]
impl Clone for RenameRule
[src]
fn clone(&self) -> RenameRule
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for RenameRule
[src]
fn default() -> RenameRule
[src]
impl Debug for RenameRule
[src]
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>
[src]
impl<'de> Deserialize<'de> for RenameRule
[src]
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
impl Send for RenameRule
impl Sync for RenameRule
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,