pub struct PoolClient<H> { /* private fields */ }Expand description
A synchronous stratum pool client, customized with a MessageHandler.
Implementations§
Source§impl<H: MessageHandler> PoolClient<H>
impl<H: MessageHandler> PoolClient<H>
Sourcepub fn connect<F>(
address: &str,
login: &str,
pass: &str,
keepalive: Option<Duration>,
agent: &str,
make_handler: F,
) -> Result<Self>
pub fn connect<F>( address: &str, login: &str, pass: &str, keepalive: Option<Duration>, agent: &str, make_handler: F, ) -> Result<Self>
Synchronously connect to the server; pass the initial job to a MessageHandler constructor.
Sourcepub fn write_handle(&self) -> Arc<Mutex<PoolClientWriter>>
pub fn write_handle(&self) -> Arc<Mutex<PoolClientWriter>>
Return a new handle to the write end of the client connection.
Auto Trait Implementations§
impl<H> Freeze for PoolClient<H>where
H: Freeze,
impl<H> RefUnwindSafe for PoolClient<H>where
H: RefUnwindSafe,
impl<H> Send for PoolClient<H>where
H: Send,
impl<H> Sync for PoolClient<H>where
H: Sync,
impl<H> Unpin for PoolClient<H>where
H: Unpin,
impl<H> UnwindSafe for PoolClient<H>where
H: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more