[][src]Module bitcoin_num::endian

Functions for endianess conversions; required to support old Rust compiler versions

Functions

bytes_to_u16_slice_be

Converts byte string into an array of u16 using bytes_to_u16_slice_be encoding function.

bytes_to_u16_slice_le

Converts byte string into an array of u16 using bytes_to_u16_slice_le encoding function.

bytes_to_u32_slice_be

Converts byte string into an array of u32 using bytes_to_u32_slice_be encoding function.

bytes_to_u32_slice_le

Converts byte string into an array of u32 using bytes_to_u32_slice_le encoding function.

bytes_to_u64_slice_be

Converts byte string into an array of u64 using bytes_to_u64_slice_be encoding function.

bytes_to_u64_slice_le

Converts byte string into an array of u64 using bytes_to_u64_slice_le encoding function.

i16_to_array_be

Converts i16 into a fixed-size array using big endian encoding (most significant byte first).

i16_to_array_le

Converts i16 into a fixed-size array using little endian encoding (least significant byte first).

i32_to_array_be

Converts i32 into a fixed-size array using big endian encoding (most significant byte first).

i32_to_array_le

Converts i32 into a fixed-size array using little endian encoding (least significant byte first).

i64_to_array_be

Converts i64 into a fixed-size array using big endian encoding (most significant byte first).

i64_to_array_le

Converts i64 into a fixed-size array using little endian encoding (least significant byte first).

slice_to_i16_be

Converts &[u8] slice in big endian encoding (most significant byte first) into i16. Panics if the slice length is not equal to the size of the type

slice_to_i16_le

Converts &[u8] slice in little endian encoding (least significant byte first) into i16. Panics if the slice length is not equal to the size of the type

slice_to_i32_be

Converts &[u8] slice in big endian encoding (most significant byte first) into i32. Panics if the slice length is not equal to the size of the type

slice_to_i32_le

Converts &[u8] slice in little endian encoding (least significant byte first) into i32. Panics if the slice length is not equal to the size of the type

slice_to_i64_be

Converts &[u8] slice in big endian encoding (most significant byte first) into i64. Panics if the slice length is not equal to the size of the type

slice_to_i64_le

Converts &[u8] slice in little endian encoding (least significant byte first) into i64. Panics if the slice length is not equal to the size of the type

slice_to_u16_be

Converts &[u8] slice in big endian encoding (most significant byte first) into u16. Panics if the slice length is not equal to the size of the type

slice_to_u16_le

Converts &[u8] slice in little endian encoding (least significant byte first) into u16. Panics if the slice length is not equal to the size of the type

slice_to_u32_be

Converts &[u8] slice in big endian encoding (most significant byte first) into u32. Panics if the slice length is not equal to the size of the type

slice_to_u32_le

Converts &[u8] slice in little endian encoding (least significant byte first) into u32. Panics if the slice length is not equal to the size of the type

slice_to_u64_be

Converts &[u8] slice in big endian encoding (most significant byte first) into u64. Panics if the slice length is not equal to the size of the type

slice_to_u64_le

Converts &[u8] slice in little endian encoding (least significant byte first) into u64. Panics if the slice length is not equal to the size of the type

u16_to_array_be

Converts u16 into a fixed-size array using big endian encoding (most significant byte first).

u16_to_array_le

Converts u16 into a fixed-size array using little endian encoding (least significant byte first).

u32_to_array_be

Converts u32 into a fixed-size array using big endian encoding (most significant byte first).

u32_to_array_le

Converts u32 into a fixed-size array using little endian encoding (least significant byte first).

u64_to_array_be

Converts u64 into a fixed-size array using big endian encoding (most significant byte first).

u64_to_array_le

Converts u64 into a fixed-size array using little endian encoding (least significant byte first).