[−][src]Struct stratum_server::Connection
Fields
sender: Arc<Mutex<UnboundedSender<String>>>subscribed: Arc<Mutex<bool>>session_start: SystemTimeconnection_state: Mutex<ConnectionState>difficulty: Arc<Mutex<f64>>stats: Arc<Mutex<MinerStats>>needs_ban: Arc<Mutex<bool>>next_difficulty: Arc<Mutex<Option<f64>>>id: Uuidsubscriber_id: Arc<Mutex<String>>miner_info: Arc<RwLock<MinerInfo>>job_stats: Arc<Mutex<JobStats>>options: Arc<MinerOptions>var_diff: Arc<Mutex<bool>>last_message_id: Arc<Mutex<ID>>worker_info: Arc<Mutex<WorkerInfo>>state: Arc<Mutex<State>>stop_source: Arc<Mutex<Option<StopSource>>>stop_token: StopTokenImplementations
impl<State: Clone + Send + Sync + 'static> Connection<State>[src]
pub fn new(
addr: SocketAddr,
sender: UnboundedSender<String>,
initial_difficulty: f64,
var_diff_config: VarDiffConfig,
state: State
) -> Self[src]
addr: SocketAddr,
sender: UnboundedSender<String>,
initial_difficulty: f64,
var_diff_config: VarDiffConfig,
state: State
) -> Self
pub async fn info<'_>(&'_ self) -> MinerInfo[src]
pub async fn is_disconnected<'_>(&'_ self) -> bool[src]
pub async fn send<T: Serialize, '_>(&'_ self, message: T) -> Result<()>[src]
pub async fn shutdown<'_>(&'_ self) -> Result<()>[src]
pub async fn disconnect<'_>(&'_ self)[src]
pub async fn ban<'_>(&'_ self)[src]
pub async fn needs_ban<'_>(&'_ self) -> bool[src]
pub async fn get_stats<'_>(&'_ self) -> MinerStats[src]
pub async fn ip<'_>(&'_ self) -> IpAddr[src]
pub fn id(&self) -> Uuid[src]
pub async fn set_sid<'_>(
&'_ self,
sid: Option<String>,
sid_size: usize
) -> String[src]
&'_ self,
sid: Option<String>,
sid_size: usize
) -> String
pub async fn set_var_diff<'_>(&'_ self, var_diff: bool)[src]
pub async fn set_worker_name<'_>(&'_ self, name: Option<String>)[src]
pub async fn set_account_id<'_>(&'_ self, id: i32)[src]
pub async fn get_account_id<'_>(&'_ self) -> i32[src]
pub async fn set_client<'_, '_>(&'_ self, client: &'_ str)[src]
pub async fn get_client<'_>(&'_ self) -> Option<String>[src]
pub async fn set_worker_id<'_>(&'_ self, id: Uuid)[src]
pub async fn get_sid<'_>(&'_ self) -> Option<Buffer>[src]
pub async fn get_worker<'_>(&'_ self) -> WorkerInfo[src]
pub async fn authorized<'_>(&'_ self) -> bool[src]
pub async fn authorize<'_>(&'_ self)[src]
pub async fn subscribed<'_>(&'_ self) -> bool[src]
pub async fn subscribe<'_>(&'_ self)[src]
pub async fn set_difficulty<'_>(&'_ self, difficulty: f64)[src]
pub async fn get_difficulty<'_>(&'_ self) -> f64[src]
pub async fn get_state<'_>(&'_ self) -> State[src]
pub async fn set_state<'_>(&'_ self, state: State)[src]
pub async fn valid_share<'_>(&'_ self)[src]
pub async fn update_difficulty<'_>(&'_ self) -> Option<f64>[src]
pub async fn invalid_share<'_>(&'_ self)[src]
pub fn get_stop_token(&self) -> StopToken[src]
pub async fn consider_ban<'_>(&'_ self)[src]
Trait Implementations
impl<State: Debug> Debug for Connection<State>[src]
Auto Trait Implementations
impl<State> !RefUnwindSafe for Connection<State>
impl<State> Send for Connection<State> where
State: Send,
State: Send,
impl<State> Sync for Connection<State> where
State: Send,
State: Send,
impl<State> Unpin for Connection<State>
impl<State> !UnwindSafe for Connection<State>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,