Skip to content

Commit

Permalink
deploy: 07490c7
Browse files Browse the repository at this point in the history
  • Loading branch information
nuttycom committed Dec 13, 2024
1 parent cc45acf commit 6fe13f4
Show file tree
Hide file tree
Showing 139 changed files with 643 additions and 587 deletions.
52 changes: 34 additions & 18 deletions rustdoc/latest/src/zcash_protocol/consensus.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -782,13 +782,23 @@
<a href="#781" id="781">781</a>
<a href="#782" id="782">782</a>
<a href="#783" id="783">783</a>
<a href="#784" id="784">784</a></pre></div><pre class="rust"><code><span class="doccomment">//! Consensus logic and parameters.

<a href="#784" id="784">784</a>
<a href="#785" id="785">785</a>
<a href="#786" id="786">786</a>
<a href="#787" id="787">787</a>
<a href="#788" id="788">788</a>
<a href="#789" id="789">789</a>
<a href="#790" id="790">790</a>
<a href="#791" id="791">791</a>
<a href="#792" id="792">792</a></pre></div><pre class="rust"><code><span class="doccomment">//! Consensus logic and parameters.

</span><span class="kw">use </span>core::cmp::{Ord, Ordering};
<span class="kw">use </span>core::convert::TryFrom;
<span class="kw">use </span>core::fmt;
<span class="kw">use </span>core::ops::{Add, Bound, RangeBounds, Sub};

<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="kw">use </span>memuse::DynamicUsage;
<span class="kw">use </span>std::cmp::{Ord, Ordering};
<span class="kw">use </span>std::convert::TryFrom;
<span class="kw">use </span>std::fmt;
<span class="kw">use </span>std::ops::{Add, Bound, RangeBounds, Sub};

<span class="kw">use </span><span class="kw">crate</span>::constants::{mainnet, regtest, testnet};

Expand All @@ -800,7 +810,8 @@
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
</span><span class="kw">pub struct </span>BlockHeight(u32);

<span class="macro">memuse::impl_no_dynamic_usage!</span>(BlockHeight);
<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="macro">memuse::impl_no_dynamic_usage!</span>(BlockHeight);

<span class="doccomment">/// The height of the genesis block on a network.
</span><span class="kw">pub const </span>H0: BlockHeight = BlockHeight(<span class="number">0</span>);
Expand Down Expand Up @@ -848,7 +859,7 @@
}

<span class="kw">impl </span>TryFrom&lt;u64&gt; <span class="kw">for </span>BlockHeight {
<span class="kw">type </span>Error = std::num::TryFromIntError;
<span class="kw">type </span>Error = core::num::TryFromIntError;

<span class="kw">fn </span>try_from(value: u64) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>, <span class="self">Self</span>::Error&gt; {
u32::try_from(value).map(BlockHeight)
Expand All @@ -862,15 +873,15 @@
}

<span class="kw">impl </span>TryFrom&lt;i32&gt; <span class="kw">for </span>BlockHeight {
<span class="kw">type </span>Error = std::num::TryFromIntError;
<span class="kw">type </span>Error = core::num::TryFromIntError;

<span class="kw">fn </span>try_from(value: i32) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>, <span class="self">Self</span>::Error&gt; {
u32::try_from(value).map(BlockHeight)
}
}

<span class="kw">impl </span>TryFrom&lt;i64&gt; <span class="kw">for </span>BlockHeight {
<span class="kw">type </span>Error = std::num::TryFromIntError;
<span class="kw">type </span>Error = core::num::TryFromIntError;

<span class="kw">fn </span>try_from(value: i64) -&gt; <span class="prelude-ty">Result</span>&lt;<span class="self">Self</span>, <span class="self">Self</span>::Error&gt; {
u32::try_from(value).map(BlockHeight)
Expand Down Expand Up @@ -986,7 +997,8 @@
</span>Regtest,
}

<span class="macro">memuse::impl_no_dynamic_usage!</span>(NetworkType);
<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="macro">memuse::impl_no_dynamic_usage!</span>(NetworkType);

<span class="kw">impl </span>NetworkConstants <span class="kw">for </span>NetworkType {
<span class="kw">fn </span>coin_type(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; u32 {
Expand Down Expand Up @@ -1108,7 +1120,8 @@
</span><span class="attr">#[derive(PartialEq, Eq, Copy, Clone, Debug)]
</span><span class="kw">pub struct </span>MainNetwork;

<span class="macro">memuse::impl_no_dynamic_usage!</span>(MainNetwork);
<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="macro">memuse::impl_no_dynamic_usage!</span>(MainNetwork);

<span class="doccomment">/// The production network.
</span><span class="kw">pub const </span>MAIN_NETWORK: MainNetwork = MainNetwork;
Expand Down Expand Up @@ -1137,7 +1150,8 @@
</span><span class="attr">#[derive(PartialEq, Eq, Copy, Clone, Debug)]
</span><span class="kw">pub struct </span>TestNetwork;

<span class="macro">memuse::impl_no_dynamic_usage!</span>(TestNetwork);
<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="macro">memuse::impl_no_dynamic_usage!</span>(TestNetwork);

<span class="doccomment">/// The test network.
</span><span class="kw">pub const </span>TEST_NETWORK: TestNetwork = TestNetwork;
Expand Down Expand Up @@ -1171,7 +1185,8 @@
</span>TestNetwork,
}

<span class="macro">memuse::impl_no_dynamic_usage!</span>(Network);
<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="macro">memuse::impl_no_dynamic_usage!</span>(Network);

<span class="kw">impl </span>Parameters <span class="kw">for </span>Network {
<span class="kw">fn </span>network_type(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; NetworkType {
Expand Down Expand Up @@ -1232,7 +1247,8 @@
</span>ZFuture,
}

<span class="macro">memuse::impl_no_dynamic_usage!</span>(NetworkUpgrade);
<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="macro">memuse::impl_no_dynamic_usage!</span>(NetworkUpgrade);

<span class="kw">impl </span>fmt::Display <span class="kw">for </span>NetworkUpgrade {
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter&lt;<span class="lifetime">'_</span>&gt;) -&gt; fmt::Result {
Expand Down Expand Up @@ -1322,7 +1338,8 @@
</span>ZFuture,
}

<span class="macro">memuse::impl_no_dynamic_usage!</span>(BranchId);
<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="macro">memuse::impl_no_dynamic_usage!</span>(BranchId);

<span class="kw">impl </span>TryFrom&lt;u32&gt; <span class="kw">for </span>BranchId {
<span class="kw">type </span>Error = <span class="kw-2">&amp;</span><span class="lifetime">'static </span>str;
Expand Down Expand Up @@ -1472,7 +1489,7 @@
.height_bounds(params)
.map_or(Strategy::boxed(Just(<span class="prelude-val">None</span>)), |(lower, upper)| {
Strategy::boxed(
(lower.<span class="number">0</span>..upper.map_or(std::u32::MAX, |u| u.<span class="number">0</span>))
(lower.<span class="number">0</span>..upper.map_or(core::u32::MAX, |u| u.<span class="number">0</span>))
.prop_map(|h| <span class="prelude-val">Some</span>(BlockHeight(h))),
)
})
Expand All @@ -1491,7 +1508,6 @@
<span class="kw">use super</span>::{
BlockHeight, BranchId, NetworkUpgrade, Parameters, MAIN_NETWORK, UPGRADES_IN_ORDER,
};
<span class="kw">use </span>std::convert::TryFrom;

<span class="attr">#[test]
</span><span class="kw">fn </span>nu_ordering() {
Expand Down
24 changes: 19 additions & 5 deletions rustdoc/latest/src/zcash_protocol/lib.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,38 @@
<a href="#56" id="56">56</a>
<a href="#57" id="57">57</a>
<a href="#58" id="58">58</a>
<a href="#59" id="59">59</a></pre></div><pre class="rust"><code><span class="doccomment">//! *A crate for Zcash protocol constants and value types.*
<a href="#59" id="59">59</a>
<a href="#60" id="60">60</a>
<a href="#61" id="61">61</a>
<a href="#62" id="62">62</a>
<a href="#63" id="63">63</a>
<a href="#64" id="64">64</a>
<a href="#65" id="65">65</a>
<a href="#66" id="66">66</a></pre></div><pre class="rust"><code><span class="doccomment">//! *A crate for Zcash protocol constants and value types.*
//!
//! `zcash_protocol` contains Rust structs, traits and functions that provide the network constants
//! for the Zcash main and test networks, as well types for representing ZEC amounts and value
//! balances.
//!
//! ## Feature flags
</span><span class="attr">#![doc = <span class="macro">document_features::document_features!</span>()]
</span><span class="attr">#![cfg_attr(feature = <span class="string">"std"</span>, doc = <span class="string">"## Feature flags"</span>)]
#![cfg_attr(feature = <span class="string">"std"</span>, doc = <span class="macro">document_features::document_features!</span>())]
</span><span class="doccomment">//!

</span><span class="attr">#![cfg_attr(docsrs, feature(doc_cfg))]
</span><span class="attr">#![no_std]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
</span><span class="comment">// Catch documentation errors caused by code changes.
</span><span class="attr">#![deny(rustdoc::broken_intra_doc_links)]
</span><span class="comment">// Temporary until we have addressed all Result&lt;T, ()&gt; cases.
</span><span class="attr">#![allow(clippy::result_unit_err)]

</span><span class="kw">use </span>core::fmt;
#[cfg_attr(any(test, feature = <span class="string">"test-dependencies"</span>), macro_use)]
</span><span class="kw">extern crate </span>alloc;

<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="kw">extern crate </span>std;

<span class="kw">use </span>core::fmt;

<span class="kw">pub mod </span>consensus;
<span class="kw">pub mod </span>constants;
Expand Down
34 changes: 24 additions & 10 deletions rustdoc/latest/src/zcash_protocol/memo.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,25 @@
<a href="#414" id="414">414</a>
<a href="#415" id="415">415</a>
<a href="#416" id="416">416</a>
<a href="#417" id="417">417</a></pre></div><pre class="rust"><code><span class="doccomment">//! Structs for handling encrypted memos.

</span><span class="kw">use </span>std::cmp::Ordering;
<span class="kw">use </span>std::error;
<span class="kw">use </span>std::fmt;
<span class="kw">use </span>std::ops::Deref;
<span class="kw">use </span>std::str;
<a href="#417" id="417">417</a>
<a href="#418" id="418">418</a>
<a href="#419" id="419">419</a>
<a href="#420" id="420">420</a>
<a href="#421" id="421">421</a>
<a href="#422" id="422">422</a>
<a href="#423" id="423">423</a>
<a href="#424" id="424">424</a></pre></div><pre class="rust"><code><span class="doccomment">//! Structs for handling encrypted memos.

</span><span class="kw">use </span>alloc::borrow::ToOwned;
<span class="kw">use </span>alloc::boxed::Box;
<span class="kw">use </span>alloc::string::String;
<span class="kw">use </span>core::cmp::Ordering;
<span class="kw">use </span>core::fmt;
<span class="kw">use </span>core::ops::Deref;
<span class="kw">use </span>core::str;

<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="kw">use </span>std::error;

<span class="doccomment">/// Format a byte array as a colon-delimited hex string.
///
Expand All @@ -447,7 +459,7 @@
<span class="doccomment">/// Errors that may result from attempting to construct an invalid memo.
</span><span class="attr">#[derive(Debug, Clone, PartialEq, Eq)]
</span><span class="kw">pub enum </span>Error {
InvalidUtf8(std::str::Utf8Error),
InvalidUtf8(core::str::Utf8Error),
TooLong(usize),
}

Expand All @@ -460,7 +472,8 @@
}
}

<span class="kw">impl </span>error::Error <span class="kw">for </span>Error {}
<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="kw">impl </span>error::Error <span class="kw">for </span>Error {}

<span class="doccomment">/// The unencrypted memo bytes received alongside a shielded note in a Zcash transaction.
</span><span class="attr">#[derive(Clone)]
Expand Down Expand Up @@ -698,7 +711,8 @@

<span class="attr">#[cfg(test)]
</span><span class="kw">mod </span>tests {
<span class="kw">use </span>std::str::FromStr;
<span class="kw">use </span>alloc::boxed::Box;
<span class="kw">use </span>alloc::str::FromStr;

<span class="kw">use super</span>::{Error, Memo, MemoBytes};

Expand Down
34 changes: 23 additions & 11 deletions rustdoc/latest/src/zcash_protocol/value.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,23 @@
<a href="#566" id="566">566</a>
<a href="#567" id="567">567</a>
<a href="#568" id="568">568</a>
<a href="#569" id="569">569</a></pre></div><pre class="rust"><code><span class="kw">use </span>std::convert::{Infallible, TryFrom};
<span class="kw">use </span>std::error;
<span class="kw">use </span>std::iter::Sum;
<span class="kw">use </span>std::num::NonZeroU64;
<span class="kw">use </span>std::ops::{Add, Div, Mul, Neg, Sub};

<span class="kw">use </span>memuse::DynamicUsage;
<a href="#569" id="569">569</a>
<a href="#570" id="570">570</a>
<a href="#571" id="571">571</a>
<a href="#572" id="572">572</a>
<a href="#573" id="573">573</a>
<a href="#574" id="574">574</a>
<a href="#575" id="575">575</a></pre></div><pre class="rust"><code><span class="kw">use </span>core::convert::{Infallible, TryFrom};
<span class="kw">use </span>core::fmt;
<span class="kw">use </span>core::iter::Sum;
<span class="kw">use </span>core::num::NonZeroU64;
<span class="kw">use </span>core::ops::{Add, Div, Mul, Neg, Sub};

<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="kw">use </span>std::error;

<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="kw">use </span>memuse::DynamicUsage;

<span class="kw">pub const </span>COIN: u64 = <span class="number">1_0000_0000</span>;
<span class="kw">pub const </span>MAX_MONEY: u64 = <span class="number">21_000_000 </span>* COIN;
Expand All @@ -590,7 +600,8 @@
</span><span class="attr">#[derive(Clone, Copy, Debug, PartialEq, PartialOrd, Eq, Ord)]
</span><span class="kw">pub struct </span>ZatBalance(i64);

<span class="macro">memuse::impl_no_dynamic_usage!</span>(ZatBalance);
<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="macro">memuse::impl_no_dynamic_usage!</span>(ZatBalance);

<span class="kw">impl </span>ZatBalance {
<span class="doccomment">/// Returns a zero-valued ZatBalance.
Expand Down Expand Up @@ -1011,10 +1022,11 @@
Underflow,
}

<span class="kw">impl </span>error::Error <span class="kw">for </span>BalanceError {}
<span class="attr">#[cfg(feature = <span class="string">"std"</span>)]
</span><span class="kw">impl </span>error::Error <span class="kw">for </span>BalanceError {}

<span class="kw">impl </span>std::fmt::Display <span class="kw">for </span>BalanceError {
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>std::fmt::Formatter) -&gt; std::fmt::Result {
<span class="kw">impl </span>fmt::Display <span class="kw">for </span>BalanceError {
<span class="kw">fn </span>fmt(<span class="kw-2">&amp;</span><span class="self">self</span>, f: <span class="kw-2">&amp;mut </span>fmt::Formatter) -&gt; fmt::Result {
<span class="kw">match </span><span class="kw-2">&amp;</span><span class="self">self </span>{
BalanceError::Overflow =&gt; {
<span class="macro">write!</span>(
Expand Down
Loading

0 comments on commit 6fe13f4

Please sign in to comment.