Trait seec::protocols::Ring

source ·
pub trait Ring: WrappingAdd + WrappingSub + WrappingMul + Pow<u32, Output = Self> + BitAnd<Output = Self> + BitXor<Output = Self> + Shl<usize, Output = Self> + Shr<usize, Output = Self> + Plain + Share<Plain = Self> + Ord + Eq + RemoteSend + 'static + Sized {
    const BITS: usize;
    const BYTES: usize;
    const MAX: Self;
    const ZERO: Self;
    const ONE: Self;

    // Required method
    fn from_block(b: Block) -> Self;

    // Provided method
    fn get_bit(&self, idx: usize) -> bool { ... }
}

Required Associated Constants§

source

const BITS: usize

source

const BYTES: usize

source

const MAX: Self

source

const ZERO: Self

source

const ONE: Self

Required Methods§

source

fn from_block(b: Block) -> Self

Provided Methods§

source

fn get_bit(&self, idx: usize) -> bool

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Ring for u8

source§

const BITS: usize = 8usize

source§

const BYTES: usize = 1usize

source§

const MAX: Self = 255u8

source§

const ZERO: Self = 0u8

source§

const ONE: Self = 1u8

source§

fn from_block(b: Block) -> Self

source§

impl Ring for u16

source§

const BITS: usize = 16usize

source§

const BYTES: usize = 2usize

source§

const MAX: Self = 65_535u16

source§

const ZERO: Self = 0u16

source§

const ONE: Self = 1u16

source§

fn from_block(b: Block) -> Self

source§

impl Ring for u32

source§

const BITS: usize = 32usize

source§

const BYTES: usize = 4usize

source§

const MAX: Self = 4_294_967_295u32

source§

const ZERO: Self = 0u32

source§

const ONE: Self = 1u32

source§

fn from_block(b: Block) -> Self

source§

impl Ring for u64

source§

const BITS: usize = 64usize

source§

const BYTES: usize = 8usize

source§

const MAX: Self = 18_446_744_073_709_551_615u64

source§

const ZERO: Self = 0u64

source§

const ONE: Self = 1u64

source§

fn from_block(b: Block) -> Self

source§

impl Ring for u128

source§

const BITS: usize = 128usize

source§

const BYTES: usize = 16usize

source§

const MAX: Self = 340_282_366_920_938_463_463_374_607_431_768_211_455u128

source§

const ZERO: Self = 0u128

source§

const ONE: Self = 1u128

source§

fn from_block(b: Block) -> Self

Implementors§