The newtype sanity rules (a name I came up with): * Newtypes should have at most one constructor that directly references the inner field. * Newtypes should have at most three accessor methods that directly reference the ineer field: one for owned access, the second for borrowed and the third for mutably borrowed. * All other methods should use the methods above to perform operations on the newtype and not directly access the fields. This commit makes `Script` and `ScriptBuf` obey these except for `reserve` and `reserve_exact` since we don't have `as_mut_vec` method. As a side effect it also adds `const` to `ScriptBuf::from_bytes`. |
||
---|---|---|
.. | ||
contrib | ||
src | ||
CHANGELOG.md | ||
Cargo.toml | ||
README.md |
README.md
Rust Bitcoin - primitive types.
This crate provides primitive data types that are used throughout the
rust-bitcoin
ecosystem.
Semver compliance
Functions marked as unstable (e.g. foo__unstable
) are not guaranteed to uphold semver compliance.
They are primarily provided to support rust-bitcoin
.
Minimum Supported Rust Version (MSRV)
This library should always compile with any combination of features on Rust 1.63.0.
Licensing
The code in this project is licensed under the Creative Commons CC0 1.0 Universal license. We use the SPDX license list and SPDX IDs.