144 lines
12 KiB
HTML
144 lines
12 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
<html lang="en">
|
|||
|
<head>
|
|||
|
<meta charset="utf-8">
|
|||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|||
|
<meta name="generator" content="rustdoc">
|
|||
|
<meta name="description" content="API documentation for the Rust `RenameRule` enum in crate `serde_derive_internals`.">
|
|||
|
<meta name="keywords" content="rust, rustlang, rust-lang, RenameRule">
|
|||
|
|
|||
|
<title>serde_derive_internals::attr::RenameRule - Rust</title>
|
|||
|
|
|||
|
<link rel="stylesheet" type="text/css" href="../../normalize.css">
|
|||
|
<link rel="stylesheet" type="text/css" href="../../rustdoc.css">
|
|||
|
<link rel="stylesheet" type="text/css" href="../../main.css">
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</head>
|
|||
|
<body class="rustdoc enum">
|
|||
|
<!--[if lte IE 8]>
|
|||
|
<div class="warning">
|
|||
|
This old browser is unsupported and will most likely display funky
|
|||
|
things.
|
|||
|
</div>
|
|||
|
<![endif]-->
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<nav class="sidebar">
|
|||
|
|
|||
|
<p class='location'>Enum RenameRule</p><div class="block items"><ul><li><a href="#variants">Variants</a></li><li><a href="#methods">Methods</a></li><li><a href="#implementations">Trait Implementations</a></li></ul></div><p class='location'><a href='../index.html'>serde_derive_internals</a>::<wbr><a href='index.html'>attr</a></p><script>window.sidebarCurrent = {name: 'RenameRule', ty: 'enum', relpath: ''};</script><script defer src="sidebar-items.js"></script>
|
|||
|
</nav>
|
|||
|
|
|||
|
<nav class="sub">
|
|||
|
<form class="search-form js-only">
|
|||
|
<div class="search-container">
|
|||
|
<input class="search-input" name="search"
|
|||
|
autocomplete="off"
|
|||
|
placeholder="Click or press ‘S’ to search, ‘?’ for more options…"
|
|||
|
type="search">
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
</nav>
|
|||
|
|
|||
|
<section id='main' class="content">
|
|||
|
<h1 class='fqn'><span class='in-band'>Enum <a href='../index.html'>serde_derive_internals</a>::<wbr><a href='index.html'>attr</a>::<wbr><a class="enum" href=''>RenameRule</a></span><span class='out-of-band'><span id='render-detail'>
|
|||
|
<a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">
|
|||
|
[<span class='inner'>−</span>]
|
|||
|
</a>
|
|||
|
</span><a class='srclink' href='../../src/serde_derive_internals/case.rs.html#15-30' title='goto source code'>[src]</a></span></h1>
|
|||
|
<pre class='rust enum'>pub enum RenameRule {
|
|||
|
None,
|
|||
|
LowerCase,
|
|||
|
PascalCase,
|
|||
|
CamelCase,
|
|||
|
SnakeCase,
|
|||
|
ScreamingSnakeCase,
|
|||
|
KebabCase,
|
|||
|
}</pre><h2 id='variants' class='variants'>Variants</h2>
|
|||
|
<span id='variant.None' class='variant'><span id='None.v' class='invisible'><code>None</code></span></span><div class='docblock'><p>Don't apply a default rename rule.</p>
|
|||
|
</div><span id='variant.LowerCase' class='variant'><span id='LowerCase.v' class='invisible'><code>LowerCase</code></span></span><div class='docblock'><p>Rename direct children to "lowercase" style.</p>
|
|||
|
</div><span id='variant.PascalCase' class='variant'><span id='PascalCase.v' class='invisible'><code>PascalCase</code></span></span><div class='docblock'><p>Rename direct children to "PascalCase" style, as typically used for enum variants.</p>
|
|||
|
</div><span id='variant.CamelCase' class='variant'><span id='CamelCase.v' class='invisible'><code>CamelCase</code></span></span><div class='docblock'><p>Rename direct children to "camelCase" style.</p>
|
|||
|
</div><span id='variant.SnakeCase' class='variant'><span id='SnakeCase.v' class='invisible'><code>SnakeCase</code></span></span><div class='docblock'><p>Rename direct children to "snake_case" style, as commonly used for fields.</p>
|
|||
|
</div><span id='variant.ScreamingSnakeCase' class='variant'><span id='ScreamingSnakeCase.v' class='invisible'><code>ScreamingSnakeCase</code></span></span><div class='docblock'><p>Rename direct children to "SCREAMING_SNAKE_CASE" style, as commonly used for constants.</p>
|
|||
|
</div><span id='variant.KebabCase' class='variant'><span id='KebabCase.v' class='invisible'><code>KebabCase</code></span></span><div class='docblock'><p>Rename direct children to "kebab-case" style.</p>
|
|||
|
</div><h2 id='methods'>Methods</h2><h3 class='impl'><span class='in-band'><code>impl <a class="enum" href="../../serde_derive_internals/attr/enum.RenameRule.html" title="enum serde_derive_internals::attr::RenameRule">RenameRule</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/serde_derive_internals/case.rs.html#32-79' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.apply_to_variant' class="method"><span id='apply_to_variant.v' class='invisible'><code>fn <a href='#method.apply_to_variant' class='fnname'>apply_to_variant</a>(&self, variant: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span></h4>
|
|||
|
<h4 id='method.apply_to_field' class="method"><span id='apply_to_field.v' class='invisible'><code>fn <a href='#method.apply_to_field' class='fnname'>apply_to_field</a>(&self, field: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></code></span></h4>
|
|||
|
</div><h2 id='implementations'>Trait Implementations</h2><h3 class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="../../serde_derive_internals/attr/enum.RenameRule.html" title="enum serde_derive_internals::attr::RenameRule">RenameRule</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/serde_derive_internals/case.rs.html#14' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.fmt' class="method"><span id='fmt.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt' class='fnname'>fmt</a>(&self, __arg_0: &mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>) -> <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></code></span></h4>
|
|||
|
<div class='docblock'><p>Formats the value using the given formatter.</p>
|
|||
|
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a> for <a class="enum" href="../../serde_derive_internals/attr/enum.RenameRule.html" title="enum serde_derive_internals::attr::RenameRule">RenameRule</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/serde_derive_internals/case.rs.html#14' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='method.eq' class="method"><span id='eq.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq' class='fnname'>eq</a>(&self, __arg_0: &<a class="enum" href="../../serde_derive_internals/attr/enum.RenameRule.html" title="enum serde_derive_internals::attr::RenameRule">RenameRule</a>) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code></span></h4>
|
|||
|
<div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
|
|||
|
</div><h4 id='method.ne' class="method"><span id='ne.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne' class='fnname'>ne</a>(&self, other: &Rhs) -> <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><div class='since' title='Stable since Rust version 1.0.0'>1.0.0</div></span></h4>
|
|||
|
<div class='docblock'><p>This method tests for <code>!=</code>.</p>
|
|||
|
</div></div><h3 class='impl'><span class='in-band'><code>impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html" title="trait core::str::FromStr">FromStr</a> for <a class="enum" href="../../serde_derive_internals/attr/enum.RenameRule.html" title="enum serde_derive_internals::attr::RenameRule">RenameRule</a></code></span><span class='out-of-band'><div class='ghost'></div><a class='srclink' href='../../src/serde_derive_internals/case.rs.html#81-95' title='goto source code'>[src]</a></span></h3>
|
|||
|
<div class='impl-items'><h4 id='associatedtype.Err' class="type"><span id='Err.t' class='invisible'><code>type <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err' class="type">Err</a> = <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">()</a></code></span></h4>
|
|||
|
<div class='docblock'><p>The associated error which can be returned from parsing.</p>
|
|||
|
</div><h4 id='method.from_str' class="method"><span id='from_str.v' class='invisible'><code>fn <a href='https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str' class='fnname'>from_str</a>(rename_all_str: &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -> <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a><Self, Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#associatedtype.Err" title="type core::str::FromStr::Err">Err</a>></code></span></h4>
|
|||
|
<div class='docblock'><p>Parses a string <code>s</code> to return a value of this type. <a href="https://doc.rust-lang.org/nightly/core/str/trait.FromStr.html#tymethod.from_str">Read more</a></p>
|
|||
|
</div></div></section>
|
|||
|
<section id='search' class="content hidden"></section>
|
|||
|
|
|||
|
<section class="footer"></section>
|
|||
|
|
|||
|
<aside id="help" class="hidden">
|
|||
|
<div>
|
|||
|
<h1 class="hidden">Help</h1>
|
|||
|
|
|||
|
<div class="shortcuts">
|
|||
|
<h2>Keyboard Shortcuts</h2>
|
|||
|
|
|||
|
<dl>
|
|||
|
<dt>?</dt>
|
|||
|
<dd>Show this help dialog</dd>
|
|||
|
<dt>S</dt>
|
|||
|
<dd>Focus the search field</dd>
|
|||
|
<dt>⇤</dt>
|
|||
|
<dd>Move up in search results</dd>
|
|||
|
<dt>⇥</dt>
|
|||
|
<dd>Move down in search results</dd>
|
|||
|
<dt>⏎</dt>
|
|||
|
<dd>Go to active search result</dd>
|
|||
|
<dt>+</dt>
|
|||
|
<dd>Collapse/expand all sections</dd>
|
|||
|
</dl>
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="infos">
|
|||
|
<h2>Search Tricks</h2>
|
|||
|
|
|||
|
<p>
|
|||
|
Prefix searches with a type followed by a colon (e.g.
|
|||
|
<code>fn:</code>) to restrict the search to a given type.
|
|||
|
</p>
|
|||
|
|
|||
|
<p>
|
|||
|
Accepted types are: <code>fn</code>, <code>mod</code>,
|
|||
|
<code>struct</code>, <code>enum</code>,
|
|||
|
<code>trait</code>, <code>type</code>, <code>macro</code>,
|
|||
|
and <code>const</code>.
|
|||
|
</p>
|
|||
|
|
|||
|
<p>
|
|||
|
Search functions by type signature (e.g.
|
|||
|
<code>vec -> usize</code> or <code>* -> vec</code>)
|
|||
|
</p>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
</aside>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
<script>
|
|||
|
window.rootPath = "../../";
|
|||
|
window.currentCrate = "serde_derive_internals";
|
|||
|
</script>
|
|||
|
<script src="../../main.js"></script>
|
|||
|
<script defer src="../../search-index.js"></script>
|
|||
|
</body>
|
|||
|
</html>
|