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

pub enum BitVecOperatorSignature {
    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.

Methods

impl BitVecOperatorSignature[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<'a, T, I>(
    self,
    operands: I
) -> Result<usize, BitVecOperatorError> where
    I: IntoIterator<Item = &'a T>,
    T: 'a + BitSeq
[src]

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

pub fn result_bit_len_from_operand_bit_lens<I>(
    self,
    operand_bit_lens: I
) -> Result<usize, BitVecOperatorError> where
    I: IntoIterator<Item = usize>, 
[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 BitVecOperatorSignature[src]

impl Copy for BitVecOperatorSignature[src]

impl Eq for BitVecOperatorSignature[src]

impl PartialEq<BitVecOperatorSignature> for BitVecOperatorSignature[src]

impl Debug for BitVecOperatorSignature[src]

impl Hash for BitVecOperatorSignature[src]

impl StructuralPartialEq for BitVecOperatorSignature[src]

impl StructuralEq for BitVecOperatorSignature[src]

Auto Trait Implementations

impl Send for BitVecOperatorSignature

impl Sync for BitVecOperatorSignature

impl Unpin for BitVecOperatorSignature

impl UnwindSafe for BitVecOperatorSignature

impl RefUnwindSafe for BitVecOperatorSignature

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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

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