pub struct HashXBuilder {
pub(crate) runtime: RuntimeOption,
}
Expand description
Builder for creating HashX
instances with custom settings
Fields§
§runtime: RuntimeOption
Current runtime() setting for this builder
Implementations§
Source§impl HashXBuilder
impl HashXBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new HashXBuilder
with default settings.
Immediately calling Self::build()
would be equivalent to using
HashX::new()
.
Sourcepub fn runtime(&mut self, runtime: RuntimeOption) -> &mut Self
pub fn runtime(&mut self, runtime: RuntimeOption) -> &mut Self
Select a new RuntimeOption
.
Sourcepub fn build(&self, seed: &[u8]) -> Result<HashX, Error>
pub fn build(&self, seed: &[u8]) -> Result<HashX, Error>
Build a HashX
instance with a seed and the selected options.
Sourcepub fn build_from_rng<R: RngCore>(
&self,
rng: &mut R,
register_key: SipState,
) -> Result<HashX, Error>
pub fn build_from_rng<R: RngCore>( &self, rng: &mut R, register_key: SipState, ) -> Result<HashX, Error>
Sourcepub(crate) fn build_from_program(
&self,
program: Program,
register_key: SipState,
) -> Result<HashX, Error>
pub(crate) fn build_from_program( &self, program: Program, register_key: SipState, ) -> Result<HashX, Error>
Build a HashX
instance from an already-generated Program
and
SipState
key.
The program is either stored as-is or compiled, depending on the current
RuntimeOption
. Requires a program as well as a SipState
to be
used for initializing the register file.
Trait Implementations§
Source§impl Clone for HashXBuilder
impl Clone for HashXBuilder
Source§fn clone(&self) -> HashXBuilder
fn clone(&self) -> HashXBuilder
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 moreSource§impl Debug for HashXBuilder
impl Debug for HashXBuilder
Source§impl Default for HashXBuilder
impl Default for HashXBuilder
Source§fn default() -> HashXBuilder
fn default() -> HashXBuilder
Returns the “default value” for a type. Read more
Source§impl PartialEq for HashXBuilder
impl PartialEq for HashXBuilder
impl Eq for HashXBuilder
impl StructuralPartialEq for HashXBuilder
Auto Trait Implementations§
impl Freeze for HashXBuilder
impl RefUnwindSafe for HashXBuilder
impl Send for HashXBuilder
impl Sync for HashXBuilder
impl Unpin for HashXBuilder
impl UnwindSafe for HashXBuilder
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