[][src]Struct stratum_client::client::StratumClient

pub struct StratumClient<PP, SP> where
    PP: PoolParams,
    SP: StratumParams
{ pub write_half: Arc<Mutex<WriteHalf<TcpStream>>>, pub read_half: Arc<Mutex<BufReader<ReadHalf<TcpStream>>>>, pub config: Arc<ClientConfig<PP>>, // some fields omitted }

Fields

write_half: Arc<Mutex<WriteHalf<TcpStream>>>read_half: Arc<Mutex<BufReader<ReadHalf<TcpStream>>>>config: Arc<ClientConfig<PP>>

Methods

impl<PP, SP> StratumClient<PP, SP> where
    PP: PoolParams + Serialize + for<'de> Deserialize<'de> + Sync + Send + Debug + Clone + 'static,
    SP: StratumParams + Serialize + for<'de> Deserialize<'de> + Sync + Send + Debug + Clone + 'static, 
[src]

pub async fn new(config: ClientConfig<PP>, sid: Option<String>) -> Result<Self>[src]

pub async fn init_connection<'_>(&'_ self) -> Result<()>[src]

pub async fn init_server<'_>(&'_ self) -> Result<()>[src]

pub fn run(&self) -> Result<()>[src]

pub async fn start<'_>(&'_ self) -> Result<()>[src]

pub async fn next_message<'_>(&'_ self) -> Result<PoolPacket<PP, SP>>[src]

pub async fn authorize<'_>(&'_ self) -> Result<bool>[src]

pub async fn subscribe<'_>(&'_ self) -> Result<()>[src]

pub async fn handle_authorize_return<'_, '_>(
    &'_ self,
    _auth: &'_ PP::AuthorizeResult
) -> Result<()>
[src]

pub async fn submit<'_>(&'_ self, share: SP::Submit) -> Result<()>[src]

pub async fn is_new_work<'_>(&'_ self) -> bool[src]

pub async fn get_difficulty<'_>(&'_ self) -> f64[src]

pub async fn get_work<'_>(&'_ self) -> Option<SP::Notify>[src]

pub async fn wait_for_work<'_>(&'_ self) -> Result<()>[src]

pub async fn get_subscriber_id<'_>(&'_ self) -> String[src]

Trait Implementations

impl<PP: Clone, SP: Clone> Clone for StratumClient<PP, SP> where
    PP: PoolParams,
    SP: StratumParams,
    SP::Notify: Clone
[src]

impl<PP: Debug, SP: Debug> Debug for StratumClient<PP, SP> where
    PP: PoolParams,
    SP: StratumParams,
    SP::Notify: Debug
[src]

Auto Trait Implementations

impl<PP, SP> !RefUnwindSafe for StratumClient<PP, SP>

impl<PP, SP> Send for StratumClient<PP, SP> where
    <PP as PoolParams>::Authorize: Send + Sync,
    <SP as StratumParams>::Notify: Send,
    <SP as StratumParams>::Submit: Send,
    <PP as PoolParams>::Subscribe: Send + Sync

impl<PP, SP> Sync for StratumClient<PP, SP> where
    <PP as PoolParams>::Authorize: Send + Sync,
    <SP as StratumParams>::Notify: Send,
    <SP as StratumParams>::Submit: Send,
    <PP as PoolParams>::Subscribe: Send + Sync

impl<PP, SP> Unpin for StratumClient<PP, SP>

impl<PP, SP> !UnwindSafe for StratumClient<PP, SP>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,