#[repr(C)]pub struct SBox<T, const DEGREE: u64, const REGISTERS: usize>(pub [T; REGISTERS]);Expand description
Possible intermediate results within an S-box.
Use this column-set for an S-box that can be computed with REGISTERS-many intermediate results
(not counting the final output). The S-box is checked to ensure that REGISTERS is the optimal
number of registers for the given DEGREE for the degrees given in the Poseidon2 paper:
3, 5, 7, and 11. See eval_sbox for more information.
Tuple Fields§
§0: [T; REGISTERS]Auto Trait Implementations§
impl<T, const DEGREE: u64, const REGISTERS: usize> Freeze for SBox<T, DEGREE, REGISTERS>where
T: Freeze,
impl<T, const DEGREE: u64, const REGISTERS: usize> RefUnwindSafe for SBox<T, DEGREE, REGISTERS>where
T: RefUnwindSafe,
impl<T, const DEGREE: u64, const REGISTERS: usize> Send for SBox<T, DEGREE, REGISTERS>where
T: Send,
impl<T, const DEGREE: u64, const REGISTERS: usize> Sync for SBox<T, DEGREE, REGISTERS>where
T: Sync,
impl<T, const DEGREE: u64, const REGISTERS: usize> Unpin for SBox<T, DEGREE, REGISTERS>where
T: Unpin,
impl<T, const DEGREE: u64, const REGISTERS: usize> UnwindSafe for SBox<T, DEGREE, REGISTERS>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more