[][src]Enum gf::support::bitvec::BitVecOpSignature

pub enum BitVecOpSignature {
    Un1,
    Unn,
    UnExt(usize),
    UnRepeat(usize),
    UnSlice(usizeusize),
    B111,
    Bnn1,
    Bnnn,
    BnmConcat,
    T1nnn,
}

Signature of a bit vector operator.

In the variants below, the number 1 and variables (such n and m) are bit lengths of operands and result. Some variants also have parameters that are not operands but part of the signature instead.

Variants

Un1

Unary: (n) → 1, n > 0.

Unn

Unary: (n) → n.

UnExt(usize)

Unary: (n) → n + k where k is the usize.

UnRepeat(usize)

Unary: (n) → n × k where k is the usize.

UnSlice(usizeusize)

Unary: (n) → e - s where [s; e) is the bit range selected by the two usize parameters.

B111

Binary: (1, 1) → 1.

Bnn1

Binary: (n, n) → 1, n > 0.

Bnnn

Binary: (n, n) → n.

BnmConcat

Binary: (n, m) → n + m.

T1nnn

Ternary: (1, n, n) → n.

Implementations

impl BitVecOpSignature[src]

pub const MAX_OPERAND_COUNT: usize[src]

Maximum number of operands for any signature.

pub fn operand_count(self) -> usize[src]

Return number of expected operands.

pub fn result_bit_len(
    self,
    operand_bit_lens: &[usize]
) -> Result<usize, BitVecOpError>
[src]

Check if signature is valid for given operand bit lengths, and if it is, return the result bit length.

Trait Implementations

impl Clone for BitVecOpSignature[src]

impl Copy for BitVecOpSignature[src]

impl Debug for BitVecOpSignature[src]

impl Eq for BitVecOpSignature[src]

impl Hash for BitVecOpSignature[src]

impl PartialEq<BitVecOpSignature> for BitVecOpSignature[src]

impl StructuralEq for BitVecOpSignature[src]

impl StructuralPartialEq for BitVecOpSignature[src]

Auto Trait Implementations

impl RefUnwindSafe for BitVecOpSignature

impl Send for BitVecOpSignature

impl Sync for BitVecOpSignature

impl Unpin for BitVecOpSignature

impl UnwindSafe for BitVecOpSignature

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.