pub struct ExternalLayerConstants<T, const WIDTH: usize> { /* private fields */ }
Expand description
A struct which holds the constants for the external layer.
Implementations§
Source§impl<T, const WIDTH: usize> ExternalLayerConstants<T, WIDTH>
impl<T, const WIDTH: usize> ExternalLayerConstants<T, WIDTH>
pub fn new(initial: Vec<[T; WIDTH]>, terminal: Vec<[T; WIDTH]>) -> Self
pub fn new_from_rng<R: Rng>(external_round_number: usize, rng: &mut R) -> Self
pub fn new_from_saved_array<U, const N: usize>(
[initial, terminal]: [[[U; WIDTH]; N]; 2],
conversion_fn: fn(_: [U; WIDTH]) -> [T; WIDTH],
) -> Selfwhere
T: Clone,
pub fn get_initial_constants(&self) -> &Vec<[T; WIDTH]>
pub fn get_terminal_constants(&self) -> &Vec<[T; WIDTH]>
Trait Implementations§
Source§impl<T: Clone, const WIDTH: usize> Clone for ExternalLayerConstants<T, WIDTH>
impl<T: Clone, const WIDTH: usize> Clone for ExternalLayerConstants<T, WIDTH>
Source§fn clone(&self) -> ExternalLayerConstants<T, WIDTH>
fn clone(&self) -> ExternalLayerConstants<T, WIDTH>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<T, const WIDTH: usize> Freeze for ExternalLayerConstants<T, WIDTH>
impl<T, const WIDTH: usize> RefUnwindSafe for ExternalLayerConstants<T, WIDTH>where
T: RefUnwindSafe,
impl<T, const WIDTH: usize> Send for ExternalLayerConstants<T, WIDTH>where
T: Send,
impl<T, const WIDTH: usize> Sync for ExternalLayerConstants<T, WIDTH>where
T: Sync,
impl<T, const WIDTH: usize> Unpin for ExternalLayerConstants<T, WIDTH>where
T: Unpin,
impl<T, const WIDTH: usize> UnwindSafe for ExternalLayerConstants<T, WIDTH>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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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