Crate bitcoin_internals

Source
Expand description

§Rust Bitcoin Internal

This crate is only meant to be used internally by crates in the rust-bitcoin ecosystem.

Re-exports§

pub extern crate bincode;
pub extern crate serde_json;

Modules§

array_vec
A simplified Copy version of arrayvec::ArrayVec.
compact_size
Variable length integer encoding A.K.A CompactSize.
const_tools
Contains tools (workarounds) to make implementing const fns easier.
error
Error
macros
Various macros used by the Rust Bitcoin ecosystem.
script
Internal script related helper functions and types.
serdeserde
Contains extensions of serde and internal reexports.

Macros§

concat_bytes_to_arr
Concatenates two byte slices or byte arrays (or combination) to a single array.
cond_const
Enables const fn in specified Rust version
const_assert
Asserts a boolean expression at compile time.
copy_byte_array_from_slice
Copies first $len bytes from $slice and returns them as an array.
debug_from_display
Implements Debug by calling through to Display.
impl_array_newtype
Implements standard array methods for a given wrapper type.
impl_from_infallible
Derives From<core::convert::Infallible> for the given type.
impl_parse
Implements conversions from various string types.
impl_parse_and_serde
Implements conversions from various string types as well as serde (de)serialization.
impl_to_hex_from_lower_hex
Adds an implementation of pub fn to_hex(&self) -> String if alloc feature is enabled.
parse_error_type
Creates an error type intended for string parsing errors.
rust_version
Expands code based on Rust version this is compiled under.
serde_round_tripserde and test-serde
Does round trip test to/from serde value.
serde_string_deserialize_implserde
Implements serde::Deserialize by way of FromStr.
serde_string_implserde
Implements serde::Serialize and Deserialize by way of Display and FromStr respectively.
serde_string_serialize_implserde
Implements serde::Serialize by way of Display.
serde_struct_human_string_implserde
A combination macro where the human-readable serialization is done like serde_string_impl and the non-human-readable impl is done as a struct.
write_err
Formats error.

Traits§

ToU64
A conversion trait for unsigned integer types smaller than or equal to 64-bits.