Skip to content

Commit

Permalink
deploy: 45eecbf
Browse files Browse the repository at this point in the history
  • Loading branch information
github-merge-queue[bot] committed Mar 14, 2024
1 parent f8140cd commit 487ab2e
Show file tree
Hide file tree
Showing 1,191 changed files with 72,112 additions and 69,875 deletions.
4 changes: 2 additions & 2 deletions codegen/map-macros.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ <h2 id="mapping-into-other-types"><a class="header" href="#mapping-into-other-ty
)]
#[derive(Debug, PartialEq, Clone)]
pub struct Thing1 {
#[superstruct(only(A), partial_getter(rename = &quot;thing2a&quot;))]
#[superstruct(only(A), partial_getter(rename = "thing2a"))]
thing2: Thing2A,
#[superstruct(only(B), partial_getter(rename = &quot;thing2b&quot;))]
#[superstruct(only(B), partial_getter(rename = "thing2b"))]
thing2: Thing2B,
}

Expand Down
14 changes: 7 additions & 7 deletions config/field.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ <h2 id="only"><a class="header" href="#only">Only</a></h2>
<h2 id="getter"><a class="header" href="#getter">Getter</a></h2>
<pre><code>#[superstruct(getter(copy, ..))]
#[superstruct(getter(no_mut, ..))]
#[superstruct(getter(rename = &quot;..&quot;, ..))]
#[superstruct(getter(rename = "..", ..))]
</code></pre>
<p>Customise the implementation of the <a href="../codegen/enum.html#getters-and-setters">getter functions</a> for
this field.</p>
Expand All @@ -200,13 +200,13 @@ <h2 id="getter"><a class="header" href="#getter">Getter</a></h2>
<li><code>copy</code>: return <code>T</code> rather than <code>&amp;T</code> where <code>T</code> is the type of the field. <code>T</code> must be <code>Copy</code>
or the generated code will fail to typecheck.</li>
<li><code>no_mut</code>: do not generate a mutating getter with <code>_mut</code> suffix.</li>
<li><code>rename = &quot;name&quot;</code>: rename the immutable getter to <code>name()</code> and the mutable getter to <code>name_mut()</code>
<li><code>rename = "name"</code>: rename the immutable getter to <code>name()</code> and the mutable getter to <code>name_mut()</code>
(if enabled).</li>
</ul>
<h2 id="partial-getter"><a class="header" href="#partial-getter">Partial getter</a></h2>
<pre><code>#[superstruct(partial_getter(copy, ..))]
#[superstruct(partial_getter(no_mut, ..))]
#[superstruct(partial_getter(rename = &quot;..&quot;, ..))]
#[superstruct(partial_getter(rename = "..", ..))]
</code></pre>
<p>Customise the implementation of the <a href="../codegen/enum.html#getters-and-setters">partial getter
functions</a> for this field.</p>
Expand All @@ -217,7 +217,7 @@ <h2 id="partial-getter"><a class="header" href="#partial-getter">Partial getter<
<li><code>copy</code>: return <code>Result&lt;T, E&gt;</code> rather than <code>Result&lt;&amp;T, E&gt;</code> where <code>T</code> is the type of the field. <code>T</code>
must be <code>Copy</code> or the generated code will fail to typecheck.</li>
<li><code>no_mut</code>: do not generate a mutating getter with <code>_mut</code> suffix.</li>
<li><code>rename = &quot;name&quot;</code>: rename the immutable partial getter to <code>name()</code> and the mutable partial getter
<li><code>rename = "name"</code>: rename the immutable partial getter to <code>name()</code> and the mutable partial getter
to <code>name_mut()</code> (if enabled).</li>
</ul>
<p>The error type for partial getters can currently only be configured on a per-struct basis
Expand Down Expand Up @@ -255,13 +255,13 @@ <h2 id="flatten"><a class="header" href="#flatten">Flatten</a></h2>

#[superstruct(variants(A, B))]
struct Message {
#[superstruct(only(A), partial_getter(rename = &quot;inner_a&quot;))]
#[superstruct(only(A), partial_getter(rename = "inner_a"))]
pub inner: InnerMessageA,
#[superstruct(only(B), partial_getter(rename = &quot;inner_b&quot;))]
#[superstruct(only(B), partial_getter(rename = "inner_b"))]
pub inner: InnerMessageB,
}
<span class="boring">}</span></code></pre></pre>
<p>If you wish to only flatten into only a subset of variants, you can define them like so: </p>
<p>If you wish to only flatten into only a subset of variants, you can define them like so:</p>
<pre><pre class="playground"><code class="language-rust"><span class="boring">#![allow(unused)]
</span><span class="boring">fn main() {
</span>#[superstruct(variants(A, B))]
Expand Down
4 changes: 2 additions & 2 deletions config/struct.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ <h2 id="variants"><a class="header" href="#variants">Variants</a></h2>
<p>The <code>variants</code> attribute is <em>not optional</em>.</p>
<p><strong>Format</strong>: 1+ comma-separated identifiers.</p>
<h2 id="cast-error"><a class="header" href="#cast-error">Cast error</a></h2>
<pre><code>#[superstruct(cast_error(ty = &quot;..&quot;, expr = &quot;..&quot;))]
<pre><code>#[superstruct(cast_error(ty = "..", expr = ".."))]
</code></pre>
<p>Define the error type to be returned from <a href="../codegen/enum.html#casting-methods">casting methods</a>.</p>
<p>The expression must be of the given error type, and capable of being evaluated without any
context (it is <em>not</em> a closure).</p>
<p><strong>Format</strong>: quoted type for <code>ty</code>, quoted expression for <code>expr</code></p>
<h2 id="partial-getter-error"><a class="header" href="#partial-getter-error">Partial getter error</a></h2>
<pre><code>#[superstruct(cast_error(ty = &quot;..&quot;, expr = &quot;..&quot;))]
<pre><code>#[superstruct(cast_error(ty = "..", expr = ".."))]
</code></pre>
<p>Define the error type to be returned from <a href="../codegen/enum.html#getters-and-setters">partial getter
methods</a>.</p>
Expand Down
24 changes: 12 additions & 12 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ <h2 id="what-next"><a class="header" href="#what-next">What next?</a></h2>
</ul>
<div style="break-before: page; page-break-before: always;"></div><h1 id="setup"><a class="header" href="#setup">Setup</a></h1>
<p>To use SuperStruct in your project add <code>superstruct</code> as a dependency in your <code>Cargo.toml</code>:</p>
<pre><code class="language-toml">superstruct = &quot;0.4.0&quot;
<pre><code class="language-toml">superstruct = "0.4.0"
</code></pre>
<p>For the latest published version please consult <a href="https://crates.io/crates/superstruct"><code>crates.io</code></a>.</p>
<hr />
Expand Down Expand Up @@ -511,9 +511,9 @@ <h2 id="mapping-into-other-types"><a class="header" href="#mapping-into-other-ty
)]
#[derive(Debug, PartialEq, Clone)]
pub struct Thing1 {
#[superstruct(only(A), partial_getter(rename = &quot;thing2a&quot;))]
#[superstruct(only(A), partial_getter(rename = "thing2a"))]
thing2: Thing2A,
#[superstruct(only(B), partial_getter(rename = &quot;thing2b&quot;))]
#[superstruct(only(B), partial_getter(rename = "thing2b"))]
thing2: Thing2B,
}

Expand Down Expand Up @@ -574,14 +574,14 @@ <h2 id="variants"><a class="header" href="#variants">Variants</a></h2>
<p>The <code>variants</code> attribute is <em>not optional</em>.</p>
<p><strong>Format</strong>: 1+ comma-separated identifiers.</p>
<h2 id="cast-error"><a class="header" href="#cast-error">Cast error</a></h2>
<pre><code>#[superstruct(cast_error(ty = &quot;..&quot;, expr = &quot;..&quot;))]
<pre><code>#[superstruct(cast_error(ty = "..", expr = ".."))]
</code></pre>
<p>Define the error type to be returned from <a href="config/../codegen/enum.html#casting-methods">casting methods</a>.</p>
<p>The expression must be of the given error type, and capable of being evaluated without any
context (it is <em>not</em> a closure).</p>
<p><strong>Format</strong>: quoted type for <code>ty</code>, quoted expression for <code>expr</code></p>
<h2 id="partial-getter-error"><a class="header" href="#partial-getter-error">Partial getter error</a></h2>
<pre><code>#[superstruct(cast_error(ty = &quot;..&quot;, expr = &quot;..&quot;))]
<pre><code>#[superstruct(cast_error(ty = "..", expr = ".."))]
</code></pre>
<p>Define the error type to be returned from <a href="config/../codegen/enum.html#getters-and-setters">partial getter
methods</a>.</p>
Expand Down Expand Up @@ -648,7 +648,7 @@ <h2 id="only"><a class="header" href="#only">Only</a></h2>
<h2 id="getter"><a class="header" href="#getter">Getter</a></h2>
<pre><code>#[superstruct(getter(copy, ..))]
#[superstruct(getter(no_mut, ..))]
#[superstruct(getter(rename = &quot;..&quot;, ..))]
#[superstruct(getter(rename = "..", ..))]
</code></pre>
<p>Customise the implementation of the <a href="config/../codegen/enum.html#getters-and-setters">getter functions</a> for
this field.</p>
Expand All @@ -659,13 +659,13 @@ <h2 id="getter"><a class="header" href="#getter">Getter</a></h2>
<li><code>copy</code>: return <code>T</code> rather than <code>&amp;T</code> where <code>T</code> is the type of the field. <code>T</code> must be <code>Copy</code>
or the generated code will fail to typecheck.</li>
<li><code>no_mut</code>: do not generate a mutating getter with <code>_mut</code> suffix.</li>
<li><code>rename = &quot;name&quot;</code>: rename the immutable getter to <code>name()</code> and the mutable getter to <code>name_mut()</code>
<li><code>rename = "name"</code>: rename the immutable getter to <code>name()</code> and the mutable getter to <code>name_mut()</code>
(if enabled).</li>
</ul>
<h2 id="partial-getter"><a class="header" href="#partial-getter">Partial getter</a></h2>
<pre><code>#[superstruct(partial_getter(copy, ..))]
#[superstruct(partial_getter(no_mut, ..))]
#[superstruct(partial_getter(rename = &quot;..&quot;, ..))]
#[superstruct(partial_getter(rename = "..", ..))]
</code></pre>
<p>Customise the implementation of the <a href="config/../codegen/enum.html#getters-and-setters">partial getter
functions</a> for this field.</p>
Expand All @@ -676,7 +676,7 @@ <h2 id="partial-getter"><a class="header" href="#partial-getter">Partial getter<
<li><code>copy</code>: return <code>Result&lt;T, E&gt;</code> rather than <code>Result&lt;&amp;T, E&gt;</code> where <code>T</code> is the type of the field. <code>T</code>
must be <code>Copy</code> or the generated code will fail to typecheck.</li>
<li><code>no_mut</code>: do not generate a mutating getter with <code>_mut</code> suffix.</li>
<li><code>rename = &quot;name&quot;</code>: rename the immutable partial getter to <code>name()</code> and the mutable partial getter
<li><code>rename = "name"</code>: rename the immutable partial getter to <code>name()</code> and the mutable partial getter
to <code>name_mut()</code> (if enabled).</li>
</ul>
<p>The error type for partial getters can currently only be configured on a per-struct basis
Expand Down Expand Up @@ -714,13 +714,13 @@ <h2 id="flatten"><a class="header" href="#flatten">Flatten</a></h2>

#[superstruct(variants(A, B))]
struct Message {
#[superstruct(only(A), partial_getter(rename = &quot;inner_a&quot;))]
#[superstruct(only(A), partial_getter(rename = "inner_a"))]
pub inner: InnerMessageA,
#[superstruct(only(B), partial_getter(rename = &quot;inner_b&quot;))]
#[superstruct(only(B), partial_getter(rename = "inner_b"))]
pub inner: InnerMessageB,
}
<span class="boring">}</span></code></pre></pre>
<p>If you wish to only flatten into only a subset of variants, you can define them like so: </p>
<p>If you wish to only flatten into only a subset of variants, you can define them like so:</p>
<pre><pre class="playground"><code class="language-rust"><span class="boring">#![allow(unused)]
</span><span class="boring">fn main() {
</span>#[superstruct(variants(A, B))]
Expand Down
3 changes: 2 additions & 1 deletion rustdoc/customer/all.html
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<!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="List of all items in this crate"><title>List of all items in this crate</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-9ee3a5e31a2afa3e.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="customer" data-themes="" data-resource-suffix="" data-rustdoc-version="1.75.0 (82e1608df 2023-12-21)" data-channel="1.75.0" data-search-js="search-8fbf244ebcf71464.js" data-settings-js="settings-74424d7eec62a23e.js" ><script src="../static.files/storage-fec3eaa3851e447d.js"></script><script defer src="../static.files/main-9dd44ab47b99a0fb.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-5d8b3c7633ad77ba.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../customer/index.html">customer</a><span class="version">0.7.0</span></h2></div><div class="sidebar-elems"><section><ul class="block"><li><a href="#macros">Macros</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></section></div></nav><main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" title="help" tabindex="-1"><a href="../help.html">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><h1>List of all items</h1><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="struct.CustomerV1.html">CustomerV1</a></li><li><a href="struct.CustomerV2.html">CustomerV2</a></li><li><a href="struct.CustomerV3.html">CustomerV3</a></li></ul><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="enum.Customer.html">Customer</a></li><li><a href="enum.CustomerRef.html">CustomerRef</a></li><li><a href="enum.CustomerRefMut.html">CustomerRefMut</a></li></ul><h3 id="macros">Macros</h3><ul class="all-items"><li><a href="macro.map_customer.html">map_customer</a></li><li><a href="macro.map_customer_ref.html">map_customer_ref</a></li><li><a href="macro.map_customer_ref_mut.html">map_customer_ref_mut</a></li></ul></section></div></main></body></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="List of all items in this crate"><title>List of all items in this crate</title><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2"><link rel="stylesheet" href="../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../static.files/rustdoc-ac92e1bbe349e143.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="customer" data-themes="" data-resource-suffix="" data-rustdoc-version="1.76.0 (07dca489a 2024-02-04)" data-channel="1.76.0" data-search-js="search-2b6ce74ff89ae146.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../static.files/storage-f2adc0d6ca4d09fb.js"></script><script defer src="../static.files/main-305769736d49e732.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-feafe1bb7466e4bd.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-2c020d218678b618.svg"></head><body class="rustdoc mod sys"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle">&#9776;</button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../customer/index.html">customer</a><span class="version">0.8.0</span></h2></div><div class="sidebar-elems"><section><ul class="block"><li><a href="#macros">Macros</a></li><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></section></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../customer/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><h1>List of all items</h1><h3 id="structs">Structs</h3><ul class="all-items"><li><a href="struct.CustomerV1.html">CustomerV1</a></li><li><a href="struct.CustomerV2.html">CustomerV2</a></li><li><a href="struct.CustomerV3.html">CustomerV3</a></li></ul><h3 id="enums">Enums</h3><ul class="all-items"><li><a href="enum.Customer.html">Customer</a></li><li><a href="enum.CustomerRef.html">CustomerRef</a></li><li><a href="enum.CustomerRefMut.html">CustomerRefMut</a></li></ul><h3 id="macros">Macros</h3><ul class="all-items"><li><a href="macro.map_customer.html">map_customer</a></li><li><a href="macro.map_customer_ref.html">map_customer_ref</a></li><li><a href="macro.map_customer_ref_mut.html">map_customer_ref_mut</a></li></ul></section></div></main></body></html>
Loading

0 comments on commit 487ab2e

Please sign in to comment.