pub struct FromCasing { /* private fields */ }
Expand description
Holds information about parsing before converting into a case.
This struct is used when invoking the from_case
method on
Casing
. FromCasing
also implements Casing
.
use convert_case::{Case, Casing};
let title = "ninety-nine_problems".from_case(Case::Snake).to_case(Case::Title);
assert_eq!("Ninety-nine Problems", title);
References self
and converts to the given case.
Creates a
FromCasing
struct, which saves information about
how to parse
self
before converting to a case.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.