Trait snarkvm_utilities::bits::FromBits
source · pub trait FromBits: Sized {
// Required methods
fn from_bits_le(bits: &[bool]) -> Result<Self>;
fn from_bits_be(bits: &[bool]) -> Result<Self>;
}
Required Methods§
sourcefn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in little-endian order.
sourcefn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in big-endian order.
Implementations on Foreign Types§
source§impl FromBits for u128
impl FromBits for u128
source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in little-endian order.
source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in big-endian order.
source§impl FromBits for i32
impl FromBits for i32
source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in little-endian order.
source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in big-endian order.
source§impl FromBits for u64
impl FromBits for u64
source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in little-endian order.
source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in big-endian order.
source§impl FromBits for i16
impl FromBits for i16
source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in little-endian order.
source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in big-endian order.
source§impl FromBits for u8
impl FromBits for u8
source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in little-endian order.
source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in big-endian order.
source§impl FromBits for i8
impl FromBits for i8
source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in little-endian order.
source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in big-endian order.
source§impl FromBits for u16
impl FromBits for u16
source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in little-endian order.
source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in big-endian order.
source§impl FromBits for u32
impl FromBits for u32
source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in little-endian order.
source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in big-endian order.
source§impl FromBits for i128
impl FromBits for i128
source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in little-endian order.
source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in big-endian order.
source§impl FromBits for i64
impl FromBits for i64
source§fn from_bits_le(bits: &[bool]) -> Result<Self>
fn from_bits_le(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in little-endian order.
source§fn from_bits_be(bits: &[bool]) -> Result<Self>
fn from_bits_be(bits: &[bool]) -> Result<Self>
Reads Self
from a boolean array in big-endian order.