Struct stratum_server::StratumServerBuilder
source · [−]pub struct StratumServerBuilder<State, CState> {Show 14 fields
pub server_id: u8,
pub host: String,
pub port: u16,
pub api_host: String,
pub api_port: u16,
pub exported_port: Option<u16>,
pub max_connections: Option<usize>,
pub proxy: bool,
pub var_diff_config: VarDiffConfig,
pub upstream_config: UpstreamConfig,
pub initial_difficulty: u64,
pub state: State,
pub connection_state: PhantomData<CState>,
pub ready_indicator: ReadyIndicator,
}
Fields
server_id: u8
host: String
port: u16
api_host: String
api_port: u16
exported_port: Option<u16>
max_connections: Option<usize>
proxy: bool
var_diff_config: VarDiffConfig
upstream_config: UpstreamConfig
initial_difficulty: u64
state: State
connection_state: PhantomData<CState>
ready_indicator: ReadyIndicator
Implementations
sourceimpl<State: Clone + Send + Sync + 'static, CState: Default + Clone + Send + Sync + 'static> StratumServerBuilder<State, CState>
impl<State: Clone + Send + Sync + 'static, CState: Default + Clone + Send + Sync + 'static> StratumServerBuilder<State, CState>
pub fn new(state: State, server_id: u8) -> Self
pub fn with_host(self, host: &str) -> Self
pub fn with_port(self, port: u16) -> Self
pub fn with_api_host(self, host: &str) -> Self
pub fn with_api_port(self, port: u16) -> Self
pub fn with_max_connections(self, max_connections: usize) -> Self
pub fn with_proxy(self, value: bool) -> Self
pub fn with_var_diff(self, value: bool) -> Self
pub fn with_minimum_difficulty(self, difficulty: u64) -> Self
pub fn with_maximum_difficulty(self, difficulty: u64) -> Self
pub fn with_retarget_time(self, time: u64) -> Self
pub fn with_target_time(self, time: u64) -> Self
pub fn with_variance_percent(self, percent: f64) -> Self
pub fn with_initial_difficulty(self, difficulty: u64) -> Self
pub fn with_expected_port(self, port: u16) -> Self
pub fn with_ready_indicator(self, ready_indicator: ReadyIndicator) -> Self
pub fn with_upstream(self, url: &str) -> Self
pub fn build(self) -> StratumServer<State, CState>
Trait Implementations
sourceimpl<State: Default, CState: Default> Default for StratumServerBuilder<State, CState>
impl<State: Default, CState: Default> Default for StratumServerBuilder<State, CState>
sourcefn default() -> StratumServerBuilder<State, CState>
fn default() -> StratumServerBuilder<State, CState>
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl<State, CState> !RefUnwindSafe for StratumServerBuilder<State, CState>
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>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more