[][src]Struct stratum_server::StratumServerBuilder

pub struct StratumServerBuilder<State, CState> {
    pub host: String,
    pub port: u16,
    pub exported_port: Option<u16>,
    pub max_connections: Option<usize>,
    pub proxy: bool,
    pub var_diff_config: VarDiffConfig,
    pub initial_difficulty: f64,
    pub state: State,
    pub connection_state: CState,
}

Fields

host: Stringport: u16exported_port: Option<u16>max_connections: Option<usize>proxy: boolvar_diff_config: VarDiffConfiginitial_difficulty: f64state: Stateconnection_state: CState

Implementations

impl<State: Clone + Send + Sync + 'static, CState: Clone + Send + Sync + 'static> StratumServerBuilder<State, CState>[src]

pub fn new(state: State, connection_state: CState) -> Self[src]

pub fn with_host(self, host: &str) -> Self[src]

pub fn with_port(self, port: u16) -> Self[src]

pub fn with_max_connections(self, max_connections: usize) -> Self[src]

pub fn with_proxy(self, value: bool) -> Self[src]

pub fn with_var_diff(self, value: bool) -> Self[src]

pub fn with_minimum_difficulty(self, difficulty: f64) -> Self[src]

pub fn with_maximum_difficulty(self, difficulty: f64) -> Self[src]

pub fn with_retarget_time(self, time: i64) -> Self[src]

pub fn with_target_time(self, time: f64) -> Self[src]

pub fn with_variance_percent(self, percent: f64) -> Self[src]

pub fn with_initial_difficulty(self, difficulty: f64) -> Self[src]

pub fn with_expected_port(self, port: u16) -> Self[src]

pub fn build(self) -> StratumServer<State, CState>[src]

Trait Implementations

impl<State: Default, CState: Default> Default for StratumServerBuilder<State, CState>[src]

Auto Trait Implementations

impl<State, CState> RefUnwindSafe for StratumServerBuilder<State, CState> where
    CState: RefUnwindSafe,
    State: RefUnwindSafe

impl<State, CState> Send for StratumServerBuilder<State, CState> where
    CState: Send,
    State: Send

impl<State, CState> Sync for StratumServerBuilder<State, CState> where
    CState: Sync,
    State: Sync

impl<State, CState> Unpin for StratumServerBuilder<State, CState> where
    CState: Unpin,
    State: Unpin

impl<State, CState> UnwindSafe for StratumServerBuilder<State, CState> where
    CState: UnwindSafe,
    State: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,