[−][src]Enum gf::support::bitvec::BitVecOpSignature
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
Unary: (n) → 1, n > 0.
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
.
Unary: (n) → e - s where [s; e) is the bit range selected by
the two usize
parameters.
Binary: (1, 1) → 1.
Binary: (n, n) → 1, n > 0.
Binary: (n, n) → n.
Binary: (n, m) → n + m.
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]
self,
operand_bit_lens: &[usize]
) -> Result<usize, BitVecOpError>
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]
fn clone(&self) -> BitVecOpSignature
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for BitVecOpSignature
[src]
impl Debug for BitVecOpSignature
[src]
impl Eq for BitVecOpSignature
[src]
impl Hash for BitVecOpSignature
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<BitVecOpSignature> for BitVecOpSignature
[src]
fn eq(&self, other: &BitVecOpSignature) -> bool
[src]
fn ne(&self, other: &BitVecOpSignature) -> bool
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,