1515//! - Non-segwit stuff and you have an allocator, use the top level API. For normal usage the
1616//! [`encode`] and [`decode`] functions should suffice. There are also various other functions for
1717//! explicit control of the checksum algorithm and the case used when encoding.
18- //! - Non-segwit stuff and you do *not* have an allocator, use the
19- //! [`primitives::decode::CheckedHrpstring`] type for decoding. For encoding we provide various
20- //! top level functions of the form `encode*_to_fmt`.
21- //! - To define your own checksum algorithm implement [`crate::Checksum`] (see example below).
18+ //! - Non-segwit stuff and you do *not* have an allocator, use the [`CheckedHrpstring`] type for
19+ //! decoding. For encoding we provide various top level functions of the form `encode*_to_fmt`.
20+ //! - To define your own checksum algorithm implement [`Checksum`] (see example below).
2221//!
23- //! The original description in [BIP-0173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki)
24- //! has more details. See also [BIP-0350](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki).
22+ //! The original description in [BIP-173] has more details. See also [BIP-350].
2523//!
2624//! # Deviation from spec
2725//!
121119//! # }
122120//! ```
123121//!
122+ //! [BIP-173]: <https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki>
123+ //! [BIP-350]: <https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki>
124+ //! [`CheckedHrpstring`]: crate::primitives::decode::CheckedHrpstring
124125//! [`Checksum::CODE_LENGTH`]: crate::primitives::checksum::Checksum::CODE_LENGTH
125126
126127#![ cfg_attr( all( not( feature = "std" ) , not( test) ) , no_std) ]
@@ -339,10 +340,12 @@ pub fn encode_upper_to_fmt<Ck: Checksum, W: fmt::Write>(
339340 Ok ( ( ) )
340341}
341342
342- /// Encodes `data` to a writer ([`std:: io::Write`]) as a lowercase bech32 encoded string.
343+ /// Encodes `data` to a writer ([`io::Write`]) as a lowercase bech32 encoded string.
343344///
344345/// Encoded string will be prefixed with the `hrp` and have a checksum appended as specified by the
345346/// `Ck` algorithm (`NoChecksum` to exclude checksum all together).
347+ ///
348+ /// [`io::Write`]: std::io::Write
346349#[ cfg( feature = "std" ) ]
347350#[ inline]
348351pub fn encode_to_writer < Ck : Checksum , W : std:: io:: Write > (
@@ -353,10 +356,12 @@ pub fn encode_to_writer<Ck: Checksum, W: std::io::Write>(
353356 encode_lower_to_writer :: < Ck , W > ( w, hrp, data)
354357}
355358
356- /// Encodes `data` to a writer ([`std:: io::Write`]) as a lowercase bech32 encoded string.
359+ /// Encodes `data` to a writer ([`io::Write`]) as a lowercase bech32 encoded string.
357360///
358361/// Encoded string will be prefixed with the `hrp` and have a checksum appended as specified by the
359362/// `Ck` algorithm (`NoChecksum` to exclude checksum all together).
363+ ///
364+ /// [`io::Write`]: std::io::Write
360365#[ cfg( feature = "std" ) ]
361366#[ inline]
362367pub fn encode_lower_to_writer < Ck : Checksum , W : std:: io:: Write > (
@@ -386,10 +391,12 @@ pub fn encode_lower_to_writer<Ck: Checksum, W: std::io::Write>(
386391 Ok ( ( ) )
387392}
388393
389- /// Encodes `data` to a writer ([`std:: io::Write`]) as a uppercase bech32 encoded string.
394+ /// Encodes `data` to a writer ([`io::Write`]) as a uppercase bech32 encoded string.
390395///
391396/// Encoded string will be prefixed with the `hrp` and have a checksum appended as specified by the
392397/// `Ck` algorithm (`NoChecksum` to exclude checksum all together).
398+ ///
399+ /// [`io::Write`]: std::io::Write
393400#[ cfg( feature = "std" ) ]
394401#[ inline]
395402pub fn encode_upper_to_writer < Ck : Checksum , W : std:: io:: Write > (
0 commit comments