pub struct DataCollector<'a> { /* private fields */ }Expand description
A utility for collecting structured miner data from an API backend.
Implementations§
Source§impl<'a> DataCollector<'a>
impl<'a> DataCollector<'a>
Sourcepub fn new(miner: &'a dyn MinerInterface) -> Self
pub fn new(miner: &'a dyn MinerInterface) -> Self
Constructs a new DataCollector with the given backend and API client.
Sourcepub async fn collect_all(&mut self) -> HashMap<DataField, Value>
pub async fn collect_all(&mut self) -> HashMap<DataField, Value>
Collects all available fields from the miner and returns a map of results.
Auto Trait Implementations§
impl<'a> Freeze for DataCollector<'a>
impl<'a> !RefUnwindSafe for DataCollector<'a>
impl<'a> Send for DataCollector<'a>
impl<'a> Sync for DataCollector<'a>
impl<'a> Unpin for DataCollector<'a>
impl<'a> !UnwindSafe for DataCollector<'a>
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