alloy_primitives::aliases

Type Alias B16

Source
pub type B16 = FixedBytes<2>;
Expand description

2-byte fixed byte-array type.

Aliased Type§

struct B16(pub [u8; 2]);

Fields§

§0: [u8; 2]

Trait Implementations§

Source§

impl From<Signed<16, 1>> for B16

Source§

fn from(value: I16) -> Self

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.

Source§

impl From<Uint<16, 1>> for B16

Source§

fn from(value: U16) -> Self

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.

Source§

impl From<i16> for B16

Source§

fn from(value: i16) -> Self

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.

Source§

impl From<u16> for B16

Source§

fn from(value: u16) -> Self

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.