[][src]Trait gf::support::bitvec::CastFromBitVec

pub trait CastFromBitVec: Sized {
    fn cast_from_bit_vec(src: BitVec) -> Result<Self, CastFromBitVecError>;
}

A type that can be constructed from a bit vector via an integer cast.

Required methods

fn cast_from_bit_vec(src: BitVec) -> Result<Self, CastFromBitVecError>

Cast a bit vector into an integer.

If the bit vector is shorter than the integer, it will be extended using the appropriate signedness. If the bit vector is longer than the integer, it will be truncated according to the signedness as long as no significant bits would be discarded.

Loading content...

Implementations on Foreign Types

impl CastFromBitVec for bool[src]

impl CastFromBitVec for i8[src]

impl CastFromBitVec for i16[src]

impl CastFromBitVec for i32[src]

impl CastFromBitVec for i64[src]

impl CastFromBitVec for i128[src]

impl CastFromBitVec for u8[src]

impl CastFromBitVec for u16[src]

impl CastFromBitVec for u32[src]

impl CastFromBitVec for u64[src]

impl CastFromBitVec for u128[src]

Loading content...

Implementors

Loading content...