Skip to main content

SolverRouter

Enum SolverRouter 

Source
pub enum SolverRouter<T: CpuIDToken, M, S: Solver + From<M>, F: Solver + From<M>> {
    Taken {
        solver: S,
        _marker: PhantomData<(T, M)>,
    },
    Fallback {
        solver: F,
        _marker: PhantomData<(T, M)>,
    },
}
Expand description

A solver router that can take a solver or a fallback solver based on the CPU features

Variants§

§

Taken

Fields

§solver: S
§

Fallback

Fields

§solver: F

Trait Implementations§

Source§

impl<T: Clone + CpuIDToken, M: Clone, S: Clone + Solver + From<M>, F: Clone + Solver + From<M>> Clone for SolverRouter<T, M, S, F>

Source§

fn clone(&self) -> SolverRouter<T, M, S, F>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Copy + CpuIDToken, M: Copy, S: Copy + Solver + From<M>, F: Copy + Solver + From<M>> Copy for SolverRouter<T, M, S, F>

Source§

impl<T: Debug + CpuIDToken, M: Debug, S: Debug + Solver + From<M>, F: Debug + Solver + From<M>> Debug for SolverRouter<T, M, S, F>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: CpuIDToken, M, S: Solver + From<M>, F: Solver + From<M>> From<M> for SolverRouter<T, M, S, F>

Source§

fn from(value: M) -> Self

Converts to this type from the input type.
Source§

impl<T: CpuIDToken, M, S: Solver + From<M>, F: Solver + From<M>> Solver for SolverRouter<T, M, S, F>

Source§

fn set_limit(&mut self, limit: u64)

Set the limit.
Source§

fn get_attempted_nonces(&self) -> u64

Get the attempted nonces.
Source§

fn solve_nonce_only<const TYPE: u8>( &mut self, target: u64, mask: u64, ) -> Option<u64>

Returns a valid nonce without the actual hash. Read more
Source§

fn solve<const TYPE: u8>( &mut self, target: u64, mask: u64, ) -> Option<(u64, [u32; 8])>

Returns a valid nonce and its corresponding hash value. Read more

Auto Trait Implementations§

§

impl<T, M, S, F> Freeze for SolverRouter<T, M, S, F>
where S: Freeze, F: Freeze,

§

impl<T, M, S, F> RefUnwindSafe for SolverRouter<T, M, S, F>

§

impl<T, M, S, F> Send for SolverRouter<T, M, S, F>
where S: Send, F: Send, T: Send, M: Send,

§

impl<T, M, S, F> Sync for SolverRouter<T, M, S, F>
where S: Sync, F: Sync, T: Sync, M: Sync,

§

impl<T, M, S, F> Unpin for SolverRouter<T, M, S, F>
where S: Unpin, F: Unpin, T: Unpin, M: Unpin,

§

impl<T, M, S, F> UnsafeUnpin for SolverRouter<T, M, S, F>
where S: UnsafeUnpin, F: UnsafeUnpin,

§

impl<T, M, S, F> UnwindSafe for SolverRouter<T, M, S, F>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<!> for T

Source§

fn from(t: !) -> T

Converts to this type from the input type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<S> SolverDyn for S
where S: Solver,

Source§

fn solve_dyn( &mut self, target: u64, ty: u8, mask: u64, ) -> Option<(u64, [u32; 8])>

A dynamic dispatching wrapper for solve
Source§

fn solve_nonce_only_dyn( &mut self, target: u64, ty: u8, mask: u64, ) -> Option<u64>

A dynamic dispatching wrapper for solve_nonce_only
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.