Crate bitcoin_internals

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
Contains extensions related to arrays.
array_vec
A simplified Copy version of arrayvec::ArrayVec.
compact_size
Variable length integer encoding A.K.A CompactSize.
const_casts
Const-compatible integer casting functions.
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.
serde
Contains extensions of serde and internal reexports.
slice
Contains extensions related to slices.
wrap_debug
Contains a wrapper for a function that implements Debug.

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.
impl_array_newtype
Implements standard array methods for a given wrapper 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.
parse_error_type
Constructs an error type intended for string parsing errors.
rust_version
Expands code based on Rust version this is compiled under.
serde_round_trip
Does round trip test to/from serde value.
serde_string_deserialize_impl
Implements serde::Deserialize by way of FromStr.
serde_string_impl
Implements serde::Serialize and Deserialize by way of Display and FromStr respectively.
serde_string_serialize_impl
Implements serde::Serialize by way of Display.
serde_struct_human_string_impl
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.
transparent_newtype
Constructs a transparent wrapper around an inner type and soundly implements reference casts.
write_err
Formats error.

Traits§

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