Skip to main content

InvertOrZero

Trait InvertOrZero 

Source
pub trait InvertOrZero {
    // Required method
    fn invert_or_zero(self) -> Self;

    // Provided method
    unsafe fn invert(self) -> Self
       where Self: Sized { ... }
}
Expand description

Value that can be inverted

Required Methods§

Source

fn invert_or_zero(self) -> Self

Returns the inverted value or zero in case when self is zero

Provided Methods§

Source

unsafe fn invert(self) -> Self
where Self: Sized,

Returns the multiplicative inverse.

§Safety

Requires that self is non-zero. Behavior is undefined otherwise.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl InvertOrZero for AESTowerField8b

Source§

impl InvertOrZero for BytewiseLookup<PackedPrimitiveType<u8, AESTowerField8b>>

Source§

impl InvertOrZero for BinaryField1b

Source§

impl InvertOrZero for BinaryField128bGhash

Source§

impl InvertOrZero for GhashSq256b

Source§

impl InvertOrZero for GhashSqInvert<PackedGhashSq1x256b>

Source§

impl InvertOrZero for PackedAESBinaryField1x8b

Source§

impl InvertOrZero for PackedAESBinaryField16x8b

Source§

impl InvertOrZero for PackedAESBinaryField32x8b

Source§

impl InvertOrZero for PackedAESBinaryField64x8b

Source§

impl InvertOrZero for PackedBinaryGhash1x128b

Source§

impl InvertOrZero for PackedBinaryGhash2x128b

Source§

impl InvertOrZero for PackedBinaryGhash4x128b

Source§

impl InvertOrZero for PackedGhashSq1x256b

Source§

impl InvertOrZero for PackedGhashSq2x256b

Source§

impl<P> InvertOrZero for GhashItohTsujii<P>
where P: Copy + Square + Mul<Output = P> + Divisible<BinaryField128bGhash>,

Source§

impl<U> InvertOrZero for SlicedGhashSq256b<U>

Source§

impl<U, SubU, F, const N: usize> InvertOrZero for Divide<SubU, PackedPrimitiveType<U, F>, N>

Source§

impl<U: UnderlierType + Pod, Scalar: BinaryField, const N: usize> InvertOrZero for Scaled<PackedPrimitiveType<ScaledUnderlier<U, N>, Scalar>>

Source§

impl<U: UnderlierType> InvertOrZero for PackedPrimitiveType<U, BinaryField1b>