pub struct GroupChannels { /* private fields */ }
Expand description
wrapper around GroupChannel
for managing multiple group channels
Implementations§
source§impl GroupChannels
impl GroupChannels
pub fn new() -> Self
sourcepub fn on_channel_success_for_hom_downtream(
&mut self,
m: &OpenStandardMiningChannelSuccess<'_>
) -> Result<Vec<Mining<'static>>, Error>
pub fn on_channel_success_for_hom_downtream( &mut self, m: &OpenStandardMiningChannelSuccess<'_> ) -> Result<Vec<Mining<'static>>, Error>
Called when when a group channel created. We add the channel in its
respective group and call [GroupChannel::on_channel_success_for_hom_downtream
]
sourcepub fn update_new_prev_hash(&mut self, m: &SetNewPrevHash<'_>)
pub fn update_new_prev_hash(&mut self, m: &SetNewPrevHash<'_>)
Called when a new prev hash arrives. We loop through all group channels to update state within each group
sourcepub fn on_new_extended_mining_job(&mut self, m: &NewExtendedMiningJob<'_>)
pub fn on_new_extended_mining_job(&mut self, m: &NewExtendedMiningJob<'_>)
Called when a new extended job arrives. We loop through all group channels to update state within group
sourcepub fn last_received_job_to_standard_job(
&mut self,
channel_id: u32,
group_id: u32
) -> Result<NewMiningJob<'static>, Error>
pub fn last_received_job_to_standard_job( &mut self, channel_id: u32, group_id: u32 ) -> Result<NewMiningJob<'static>, Error>
Returns last valid job as a NewMiningJob
pub fn ids(&self) -> Vec<u32>
Trait Implementations§
source§impl Clone for GroupChannels
impl Clone for GroupChannels
source§fn clone(&self) -> GroupChannels
fn clone(&self) -> GroupChannels
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GroupChannels
impl Debug for GroupChannels
source§impl Default for GroupChannels
impl Default for GroupChannels
source§fn default() -> GroupChannels
fn default() -> GroupChannels
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GroupChannels
impl RefUnwindSafe for GroupChannels
impl Send for GroupChannels
impl Sync for GroupChannels
impl Unpin for GroupChannels
impl !UnwindSafe for GroupChannels
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