[−][src]Struct stratum_server::Connection
Fields
sender: Arc<Mutex<UnboundedSender<String>>>
subscribed: Arc<Mutex<bool>>
session_start: SystemTime
connection_state: Mutex<ConnectionState>
difficulty: Arc<Mutex<f64>>
stats: Arc<Mutex<MinerStats>>
needs_ban: Arc<Mutex<bool>>
next_difficulty: Arc<Mutex<Option<f64>>>
id: Uuid
subscriber_id: Arc<Mutex<String>>
miner_info: Arc<RwLock<MinerInfo>>
job_stats: Arc<Mutex<JobStats>>
options: Arc<MinerOptions>
var_diff: bool
last_message_id: Arc<Mutex<ID>>
worker_info: Arc<Mutex<WorkerInfo>>
Implementations
impl Connection
[src]
pub fn new(
addr: SocketAddr,
sender: UnboundedSender<String>,
initial_difficulty: f64,
var_diff_config: VarDiffConfig
) -> Self
[src]
addr: SocketAddr,
sender: UnboundedSender<String>,
initial_difficulty: f64,
var_diff_config: VarDiffConfig
) -> 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_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 valid_share<'_>(&'_ self)
[src]
pub async fn update_difficulty<'_>(&'_ self) -> Option<f64>
[src]
pub async fn invalid_share<'_>(&'_ self)
[src]
pub async fn consider_ban<'_>(&'_ self)
[src]
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Connection
impl Send for Connection
impl Sync for Connection
impl Unpin for Connection
impl !UnwindSafe for Connection
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,
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.
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.
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>,