Struct stratum_server::MinerList
source · [−]Fields
miners: Arc<RwLock<HashMap<u32, Miner>>>Implementations
sourceimpl MinerList
impl MinerList
pub fn new() -> Self
pub async fn add_miner(&self, session_id: u32, miner: Miner)
pub async fn remove_miner(&self, session_id: u32) -> Option<Miner>
pub async fn get_miner_by_id(&self, session_id: u32) -> Option<Miner>
pub async fn update_miner_by_session_id(&self, session_id: u32, miner: Miner)
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for MinerList
impl Send for MinerList
impl Sync for MinerList
impl Unpin for MinerList
impl !UnwindSafe for MinerList
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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