MCPcopy Create free account
hub / github.com/Wulf/tsync / parse_serde_case

Function parse_serde_case

src/utils.rs:272–281  ·  view source on GitHub ↗
(
    val: impl Into<Option<String>>,
)

Source from the content-addressed store, hash-verified

270}
271
272pub(crate) fn parse_serde_case(
273 val: impl Into<Option<String>>,
274) -> Option<convert_case::Case<'static>> {
275 val.into().and_then(|x| {
276 RENAME_RULES
277 .iter()
278 .find(|(name, _)| name == &x)
279 .map(|(_, rule)| *rule)
280 })
281}
282
283/// Parse a number automaticly handling radix like rust does.
284/// 0x - Hex notation

Callers 2

convert_to_tsMethod · 0.85
convert_to_tsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected